diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2013-12-27 05:15:33 +0000 |
---|---|---|
committer | Daniel Black <grooverdan@users.sourceforge.net> | 2013-12-27 05:15:33 +0000 |
commit | d3c065bf76dfdd6d6a403aa1b51b5a8f681148b0 (patch) | |
tree | 5971ed630c89704b91c0a962e810d9a46798b4db /fail2ban/server/failregex.py | |
parent | a1a219189fbb1831a33af4418df6b9f1f42a4a36 (diff) | |
download | fail2ban-d3c065bf76dfdd6d6a403aa1b51b5a8f681148b0.tar.gz |
ENH: add PyPy compatibility
Diffstat (limited to 'fail2ban/server/failregex.py')
-rw-r--r-- | fail2ban/server/failregex.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index d5732c80..60ea5cfd 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -136,7 +136,8 @@ class Regex: if self._matchCache.group("skiplines%i" % n) is not None: skippedLines += self._matchCache.group("skiplines%i" % n) n += 1 - except IndexError: + # KeyError is because of PyPy + except (IndexError, KeyError): break return skippedLines.splitlines(False) |