]> git.scottworley.com Git - pinch/blobdiff - pinch.py
Use type rather than field presence
[pinch] / 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"; }' %