Use dictionary's update() method in _cnfmerge().
This commit is contained in:
parent
7a337c1c79
commit
65c78e18b5
|
@ -43,8 +43,12 @@ def _cnfmerge(cnfs):
|
|||
else:
|
||||
cnf = {}
|
||||
for c in _flatten(cnfs):
|
||||
for k, v in c.items():
|
||||
cnf[k] = v
|
||||
try:
|
||||
cnf.update(c)
|
||||
except (AttributeError, TypeError), msg:
|
||||
print "_cnfmerge: fallback due to:", msg
|
||||
for k, v in c.items():
|
||||
cnf[k] = v
|
||||
return cnf
|
||||
|
||||
class Event:
|
||||
|
|
|
@ -43,8 +43,12 @@ def _cnfmerge(cnfs):
|
|||
else:
|
||||
cnf = {}
|
||||
for c in _flatten(cnfs):
|
||||
for k, v in c.items():
|
||||
cnf[k] = v
|
||||
try:
|
||||
cnf.update(c)
|
||||
except (AttributeError, TypeError), msg:
|
||||
print "_cnfmerge: fallback due to:", msg
|
||||
for k, v in c.items():
|
||||
cnf[k] = v
|
||||
return cnf
|
||||
|
||||
class Event:
|
||||
|
|
Loading…
Reference in New Issue