From: Scott Worley Date: Fri, 10 Apr 2020 00:59:39 +0000 (-0700) Subject: Support multiple channels X-Git-Tag: 1.0~13 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/5cfa8e119c86e2bf7c315ed1b82a10b7770fcfac Support multiple channels --- diff --git a/pinch.py b/pinch.py index ec6e8b5..0eafb90 100644 --- 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)