]> git.scottworley.com Git - pinch/commitdiff
Use type rather than field presence
authorScott Worley <scottworley@scottworley.com>
Sat, 13 Jun 2020 07:24:24 +0000 (00:24 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 18 Jun 2020 06:11:59 +0000 (23:11 -0700)
pinch.py

index 34c63f1d4b418380142baf28334507485f3f372f..bfc6ac635dfd0866e8cae54d56ac4a9c1daae44f 100644 (file)
--- 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"; }' %