From b896966bd140bc9c3c965c70597517ede83d5b86 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sat, 13 Jun 2020 00:24:24 -0700 Subject: [PATCH] Use type rather than field presence --- pinch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pinch.py b/pinch.py index 34c63f1..bfc6ac6 100644 --- a/pinch.py +++ b/pinch.py @@ -578,10 +578,10 @@ def update(args: argparse.Namespace) -> None: exprs: Dict[str, str] = {} config = read_config_files(args.channels_file) for section in config: - if 'alias_of' in config[section]: + sp = read_search_path(config[section]) + if isinstance(sp, AliasSearchPath): assert 'git_repo' not in config[section] continue - sp = read_search_path(config[section]) tarball = sp.fetch(v, section, config[section]) exprs[section] = ( 'f: f { name = "%s"; channelName = "%%s"; src = builtins.storePath "%s"; }' % -- 2.44.1