From 849fef2fe40a7dc63a5bfea8a92427bf49de5c8c Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sun, 19 Jul 2020 10:27:40 +0200 Subject: [PATCH] Merge github e1eb1da (list index out of range sourcepool) --- raspbmirror.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspbmirror.py b/raspbmirror.py index 7ce4e0c..4770fd2 100644 --- a/raspbmirror.py +++ b/raspbmirror.py @@ -179,7 +179,7 @@ def getfile(path,sha256,size): if args.sourcepool is not None: for sourcepool in args.sourcepool: sourcepool = sourcepool.encode('ascii') - if pathsplit[1] == b'pool': + if (len(pathsplit) > 1) and (pathsplit[1] == b'pool'): spp = os.path.join(sourcepool,b'/'.join(pathsplit[2:])) if os.path.isfile(spp) and (size == os.path.getsize(spp)): logging.info('trying file from sourcepool '+spp.decode('ascii')) -- 2.43.0