From: German Service Network Date: Sun, 19 Jul 2020 08:27:40 +0000 (+0200) Subject: Merge github e1eb1da (list index out of range sourcepool) X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=849fef2fe40a7dc63a5bfea8a92427bf49de5c8c;p=raspbmirror.git Merge github e1eb1da (list index out of range sourcepool) --- 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'))