1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

utils/types: Fix ParameterDict update method.

When updating a ParameterDict with another ParameterDict the unencoded
values were being merged. Ensure consistent behaviour by implicitally
iterating via `__iter__` which will cause ParameterDict values to be
decoded before being re-endcoded as expected.
This commit is contained in:
Marc Bonnici 2019-12-12 17:42:46 +00:00
parent ee54a68b65
commit 494424c8ea

View File

@ -782,11 +782,8 @@ class ParameterDict(dict):
def update(self, *args, **kwargs):
for d in list(args) + [kwargs]:
if isinstance(d, ParameterDict):
dict.update(self, d)
else:
for k, v in d.items():
self[k] = v
for k, v in d:
self[k] = v
class cpu_mask(object):