- Added string and regex to log message.

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@642 a942ae1a-1317-0410-a47c-b1dcaea8d605
_tent/ipv6_via_aInfo
Cyril Jaquier 2008-01-05 22:33:44 +00:00
parent 65dcbed591
commit 7db7967ab1
1 changed files with 4 additions and 1 deletions

View File

@ -123,5 +123,8 @@ class FailRegex(Regex):
def getHost(self): def getHost(self):
host = self._matchCache.group("host") host = self._matchCache.group("host")
if host == None: if host == None:
raise RegexException("Unexpected error. Please check your regex") # Gets a few information.
s = self._matchCache.string
r = self._matchCache.re
raise RegexException("No 'host' found in '%s' using '%s'" % (s, r))
return host return host