Merge pull request #65 from dramforever/nix-new

nix-channel: fix bug when getting path-info
This commit is contained in:
Yuxiang Zhang 2020-03-31 09:10:43 +08:00 committed by GitHub
commit dae7ff6868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,12 +309,12 @@ def update_channels(channels):
channel_failure = True channel_failure = True
logging.info(f' - Error status: {process.returncode}') logging.info(f' - Error status: {process.returncode}')
break break
else:
infos = json.loads(process.stdout)
for info in infos:
ha = hash_part(info['path'])
todo[ha] = (info['url'], f'{ha}.narinfo')
else: 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') logging.info(f' - {len(todo)} paths to download')
digits = len(str(len(todo))) digits = len(str(len(todo)))