File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/gold_tests/autest-site Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -561,16 +561,17 @@ class YAMLFile(File):
561561 else:
562562 return content # Already an object.
563563
564- def __update(self, content, out):
564+ def __update(self, content: dict , out: dict ):
565565 for key, value in content.items():
566566 if key in out:
567- if isinstance(out[key], dict) == False:
568- out.update(content)
567+ if not isinstance(out[key], dict):
568+ # Simple: just set the value.
569+ out[key] = value
569570 continue
570571
572+ # Recurse: update the nested dictionary.
571573 self.__update(value, out[key])
572574 else:
573- out[key] = {}
574575 out[key] = value
575576
576577 def update(self, content):
@@ -606,7 +607,6 @@ class RecordsYAML(YAMLFile):
606607 def __legacy_update(self, obj, new_doc=False):
607608 config = {}
608609 for name, value in obj.items():
609- ori_name = name
610610 if name.startswith("proxy.config."):
611611 name = name[len("proxy.config."):]
612612 elif name.startswith("local.config."):
You can’t perform that action at this time.
0 commit comments