- Fixed exception when passing unknown command line option

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@472 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-11-19 21:26:47 +00:00
parent f5d4cb6be2
commit c10e1bb7ff
1 changed files with 9 additions and 7 deletions

View File

@ -71,7 +71,8 @@ class Fail2banServer:
print "and bans the corresponding IP addresses using firewall rules." print "and bans the corresponding IP addresses using firewall rules."
print print
print "Only use this command for debugging purpose. Start the server with" print "Only use this command for debugging purpose. Start the server with"
print "fail2ban-client instead." print "fail2ban-client instead. The default behaviour is to start the server"
print "in background."
print print
print "Options:" print "Options:"
print " -b start in background" print " -b start in background"
@ -113,6 +114,7 @@ class Fail2banServer:
optList, args = getopt.getopt(self.__argv[1:], cmdOpts, cmdLongOpts) optList, args = getopt.getopt(self.__argv[1:], cmdOpts, cmdLongOpts)
except getopt.GetoptError: except getopt.GetoptError:
self.dispUsage() self.dispUsage()
sys.exit(-1)
self.__getCmdLineOptions(optList) self.__getCmdLineOptions(optList)