mirror of https://github.com/fail2ban/fail2ban
BF: Fix getting jail name from exceptions in beautifier for Python 3+
parent
2c34fb0aec
commit
3781ff845a
|
@ -188,9 +188,9 @@ class Beautifier:
|
||||||
logSys.debug("Beautify (error) " + `response` + " with " + `self.__inputCmd`)
|
logSys.debug("Beautify (error) " + `response` + " with " + `self.__inputCmd`)
|
||||||
msg = response
|
msg = response
|
||||||
if isinstance(response, UnknownJailException):
|
if isinstance(response, UnknownJailException):
|
||||||
msg = "Sorry but the jail '" + response[0] + "' does not exist"
|
msg = "Sorry but the jail '" + response.args[0] + "' does not exist"
|
||||||
elif isinstance(response, IndexError):
|
elif isinstance(response, IndexError):
|
||||||
msg = "Sorry but the command is invalid"
|
msg = "Sorry but the command is invalid"
|
||||||
elif isinstance(response, DuplicateJailException):
|
elif isinstance(response, DuplicateJailException):
|
||||||
msg = "The jail '" + response[0] + "' already exists"
|
msg = "The jail '" + response.args[0] + "' already exists"
|
||||||
return msg
|
return msg
|
||||||
|
|
Loading…
Reference in New Issue