From a3c30063703f051d63b2e9b5b64c396ea81ce700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu> Date: Thu, 8 Jun 2017 17:39:35 +0200 Subject: [PATCH] fix regression related to #21724 --- tester.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tester.py b/tester.py index 86010ef2..0bc0c6cd 100755 --- a/tester.py +++ b/tester.py @@ -60,11 +60,12 @@ class Tester(): if '-h' in args: log('USAGE: ' + self.USAGE) sys.exit(0) - for index, arg in enumerate(args): - if arg not in self.VALID_ARGS and index + 1 != len(args): - log('Invalid argument given: "%s".\n' % arg) - log('USAGE: ' + self.USAGE) - sys.exit(1) + for arg in args: + if arg.startswith('-'): + if arg not in self.VALID_ARGS: + log('Invalid argument given: "%s".\n' % arg) + log('USAGE: ' + self.USAGE) + sys.exit(1) else: log("Optional target user : %s" % arg) if not os.path.isdir(os.path.join('/home', arg)): -- GitLab