]> git.scottworley.com Git - pinch/commitdiff
Support multiple channels
authorScott Worley <scottworley@scottworley.com>
Fri, 10 Apr 2020 00:59:39 +0000 (17:59 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 10 Apr 2020 00:59:39 +0000 (17:59 -0700)
pinch.py

index ec6e8b587dc8014e89562f6431f8b57b8dad3fba..0eafb90814516f31b9f17d5c0da1d29c8f0378d0 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -363,13 +363,14 @@ def main(argv: List[str]) -> None:
     v = Verification()
     config = configparser.ConfigParser()
     config.read_file(open(argv[1]), argv[1])
     v = Verification()
     config = configparser.ConfigParser()
     config.read_file(open(argv[1]), argv[1])
-    channel = Channel(**dict(config['nixos'].items()))
-    fetch(v, channel)
-    parse_channel(v, channel)
-    fetch_resources(v, channel)
-    git_fetch(v, channel)
-    check_channel_contents(v, channel)
-    print(channel)
+    for section in config.sections():
+        channel = Channel(**dict(config[section].items()))
+        fetch(v, channel)
+        parse_channel(v, channel)
+        fetch_resources(v, channel)
+        git_fetch(v, channel)
+        check_channel_contents(v, channel)
+        print(channel)
 
 
 main(sys.argv)
 
 
 main(sys.argv)