From f58b4b61e24f7c6bd5f7b23e1be355dc904b95ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Oct 2013 11:28:16 +0200 Subject: [PATCH] daca2: improved command line flags --- tools/daca2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/daca2.py b/tools/daca2.py index 1692b45ac..ac9684de3 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -167,10 +167,6 @@ def scanarchive(fullpath): results.write(comm[1] + '\n') results.close() -if len(sys.argv) != 2: - print('no folder given') - sys.exit(1) - FOLDER = None REV = None for arg in sys.argv[1:]: @@ -178,6 +174,11 @@ for arg in sys.argv[1:]: REV = arg[6:] else: FOLDER = arg + +if not FOLDER: + print('no folder given') + sys.exit(1) + archives = getpackages(FOLDER) time.sleep(30)