From 8893473d82f3732cfec6c7e302e1b94ff6b62b99 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 10 Jun 2016 11:47:24 +0200 Subject: [PATCH] pypy fix: KeyError instead of IndexError by missing group --- fail2ban/server/failregex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index d343dbe0..12b8986a 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -274,7 +274,7 @@ class FailRegex(Regex): for grp in groups: try: fid = self._matchCache.group(grp) - except IndexError: + except (IndexError, KeyError): continue if fid is not None: break