daca2-getpackages: more protection when it goes wrong

This commit is contained in:
Daniel Marjamäki 2019-03-27 06:41:35 +01:00
parent 8f7eae2948
commit 8231912af9
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ def getpackages():
if not wget('ls-lR.gz'):
sys.exit(1)
subprocess.call(['nice', 'gunzip', 'ls-lR.gz'])
if not os.path.isfile('ls-lR'):
sys.exit(1)
f = open('ls-lR', 'rt')
lines = f.readlines()
f.close()