From 00c2ac4b034b68185926b0f7c8faaf9b3d021f18 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 28 Nov 2014 19:50:52 +0100 Subject: [PATCH] python 2.6 compatibility: preventing RuntimeError: dictionary changed size during iteration. --- fail2ban/client/configparserinc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fail2ban/client/configparserinc.py b/fail2ban/client/configparserinc.py index 6299b906..01fadb87 100644 --- a/fail2ban/client/configparserinc.py +++ b/fail2ban/client/configparserinc.py @@ -227,9 +227,11 @@ after = 1.conf s2 = alls.get(n) if isinstance(s2, dict): # save previous known values, for possible using in local interpolations later: + sk = {} for k, v in s2.iteritems(): if not k.startswith('known/'): - s2['known/'+k] = v + sk['known/'+k] = v + s2.update(sk) # merge section s2.update(s) else: