From 8231912af90fce6f14cc19b0ef354adf6161fc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 27 Mar 2019 06:41:35 +0100 Subject: [PATCH] daca2-getpackages: more protection when it goes wrong --- tools/daca2-getpackages.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/daca2-getpackages.py b/tools/daca2-getpackages.py index b733b1c83..d66962284 100644 --- a/tools/daca2-getpackages.py +++ b/tools/daca2-getpackages.py @@ -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()