Commit 12edbfeb by Toshio Kuratomi

Merge pull request #12177 from mgedmin/py3k

Make combine_vars() compatible with Python 3
parents 66c3461f 54dbfba8
......@@ -32,7 +32,9 @@ def combine_vars(a, b):
if C.DEFAULT_HASH_BEHAVIOUR == "merge":
return merge_hash(a, b)
else:
return dict(a.items() + b.items())
result = a.copy()
result.update(b)
return result
def merge_hash(a, b):
''' recursively merges hash b into a
......
......@@ -121,7 +121,9 @@ class VariableManager:
if C.DEFAULT_HASH_BEHAVIOUR == "merge":
return self._merge_dicts(a, b)
else:
return dict(a.items() + b.items())
result = a.copy()
result.update(b)
return result
def _merge_dicts(self, a, b):
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment