]> git.scottworley.com Git - pinch/blobdiff - pinch.py
Support multiple channels
[pinch] / 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])
-    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)