From fe6d07eae5ae85f4007f5197779aa561c29730cb Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Aug 2005 21:51:51 +0000 Subject: [PATCH] moved -v --help options to be acted before config file is read --- fail2ban.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fail2ban.py b/fail2ban.py index 883e9e82..48b845dd 100755 --- a/fail2ban.py +++ b/fail2ban.py @@ -114,10 +114,6 @@ def getCmdLineOptions(optList): """ Gets the command line options """ for opt in optList: - if opt[0] in ["-h", "--help"]: - dispUsage() - if opt[0] in ["-V", "--version"]: - dispVersion() if opt[0] == "-v": conf["verbose"] = conf["verbose"] + 1 if opt[0] == "-b": @@ -164,6 +160,10 @@ def main(): # Pre-parsing of command line options for the -c option for opt in optList: + if opt[0] in ["-h", "--help"]: + dispUsage() + if opt[0] in ["-V", "--version"]: + dispVersion() if opt[0] == "-c": conf["conffile"] = opt[1]