mirror of https://github.com/fail2ban/fail2ban
python 2.6 compatibility: preventing RuntimeError: dictionary changed size during iteration.
parent
d63b125877
commit
00c2ac4b03
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue