API to update BoardConfig manifest

This commit is contained in:
Ivan Kravets
2018-05-25 21:18:08 +03:00
parent e48e15b014
commit 5011c3e21c
2 changed files with 21 additions and 0 deletions

View File

@@ -754,6 +754,18 @@ def format_filesize(filesize):
return "%d%sB" % ((base * filesize / unit), suffix)
def merge_dicts(d1, d2, path=None):
if path is None:
path = []
for key in d2:
if (key in d1 and isinstance(d1[key], dict)
and isinstance(d2[key], dict)):
merge_dicts(d1[key], d2[key], path + [str(key)])
else:
d1[key] = d2[key]
return d1
def rmtree_(path):
def _onerror(_, name, __):