]> git.gsnw.org Git - raspbmirror.git/commitdiff
Merge github e1eb1da (list index out of range sourcepool)
authorGerman Service Network <support@gsnw.de>
Sun, 19 Jul 2020 08:27:40 +0000 (10:27 +0200)
committerGerman Service Network <support@gsnw.de>
Sun, 19 Jul 2020 08:27:40 +0000 (10:27 +0200)
raspbmirror.py

index 7ce4e0c94d8e0fdf0cf78ac839650be898e1561e..4770fd26a625e25703ed3a62765c5a0ab429cd07 100644 (file)
@@ -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'))