From: Scott Worley Date: Sat, 13 Jun 2020 07:24:24 +0000 (-0700) Subject: Use type rather than field presence X-Git-Tag: 2.0.0~25 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/b896966bd140bc9c3c965c70597517ede83d5b86?ds=sidebyside Use type rather than field presence --- 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"; }' %