From 86950766c90ba4ec6976456c87d5a1eac157f487 Mon Sep 17 00:00:00 2001 From: dramforever Date: Tue, 31 Mar 2020 03:12:12 +0800 Subject: [PATCH] nix-channel: fix bug when getting path-info --- nix-channels.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nix-channels.py b/nix-channels.py index 50257c2..b453319 100755 --- a/nix-channels.py +++ b/nix-channels.py @@ -309,12 +309,12 @@ def update_channels(channels): channel_failure = True logging.info(f' - Error status: {process.returncode}') break + else: + infos = json.loads(process.stdout) + for info in infos: + ha = hash_part(info['path']) + todo[ha] = (info['url'], f'{ha}.narinfo') else: - infos = json.loads(process.stdout) - for info in infos: - ha = hash_part(info['path']) - todo[ha] = (info['url'], f'{ha}.narinfo') - logging.info(f' - {len(todo)} paths to download') digits = len(str(len(todo)))