mirror of https://github.com/fail2ban/fail2ban
- Try to log an unexpected exception if possible.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@631 a942ae1a-1317-0410-a47c-b1dcaea8d605_tent/ipv6_via_aInfo
parent
8dae8e4d0e
commit
c3977d7299
|
@ -25,14 +25,17 @@ __date__ = "$Date$"
|
|||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||
__license__ = "GPL"
|
||||
|
||||
import getopt, sys
|
||||
from common.version import version
|
||||
from server.server import Server
|
||||
import getopt, sys, logging
|
||||
|
||||
# Inserts our own modules path first in the list
|
||||
# fix for bug #343821
|
||||
sys.path.insert(1, "/usr/share/fail2ban")
|
||||
|
||||
from common.version import version
|
||||
from server.server import Server
|
||||
|
||||
# Gets the instance of the logger.
|
||||
logSys = logging.getLogger("fail2ban")
|
||||
|
||||
##
|
||||
# \mainpage Fail2Ban
|
||||
|
@ -123,7 +126,7 @@ class Fail2banServer:
|
|||
self.__server.start(self.__conf["socket"], self.__conf["force"])
|
||||
return True
|
||||
except Exception, e:
|
||||
print e
|
||||
logSys.exception(e)
|
||||
self.__server.quit()
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue