mirror of https://github.com/fail2ban/fail2ban
amend for python 3.x switch: BrokenPipeError is a build-in exception since 3.3
parent
093cd763ce
commit
7523a777f0
|
@ -27,7 +27,7 @@ import sys
|
||||||
|
|
||||||
from ..version import version, normVersion
|
from ..version import version, normVersion
|
||||||
from ..protocol import printFormatted
|
from ..protocol import printFormatted
|
||||||
from ..helpers import getLogger, str2LogLevel, getVerbosityFormat, BrokenPipeError
|
from ..helpers import getLogger, str2LogLevel, getVerbosityFormat
|
||||||
|
|
||||||
# Gets the instance of the logger.
|
# Gets the instance of the logger.
|
||||||
logSys = getLogger("fail2ban")
|
logSys = getLogger("fail2ban")
|
||||||
|
|
|
@ -183,8 +183,6 @@ def __stopOnIOError(logSys=None, logHndlr=None): # pragma: no cover
|
||||||
pass
|
pass
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
BrokenPipeError = BrokenPipeError
|
|
||||||
|
|
||||||
__origLog = logging.Logger._log
|
__origLog = logging.Logger._log
|
||||||
def __safeLog(self, level, msg, args, **kwargs):
|
def __safeLog(self, level, msg, args, **kwargs):
|
||||||
"""Safe log inject to avoid possible errors by unsafe log-handlers,
|
"""Safe log inject to avoid possible errors by unsafe log-handlers,
|
||||||
|
|
Loading…
Reference in New Issue