From 5cfa8e119c86e2bf7c315ed1b82a10b7770fcfac Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 9 Apr 2020 17:59:39 -0700 Subject: [PATCH] Support multiple channels --- pinch.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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) -- 2.44.1