Fix amd-smi firmware not printing YAML-like dictionary correctly
List string should take into account dictionary value types
Change-Id: Icc08288cb0007d43eacd1aff6d44c40a84ea9448
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
[ROCm/amdsmi commit: 57f45954b7]
Этот коммит содержится в:
@@ -258,7 +258,10 @@ class AMDSMILogger():
|
||||
elif isinstance(value, list):
|
||||
yaml_string += " " * indent + f"{key}:\n"
|
||||
for item in value:
|
||||
yaml_string += " " * (indent + 1) + f"- {item}\n"
|
||||
if isinstance(item, dict):
|
||||
yaml_string += self.custom_dump(item, indent + 1)
|
||||
else: # If the list is not a dictionary, print it as a string
|
||||
yaml_string += " " * (indent + 1) + f"- {item}\n"
|
||||
else:
|
||||
yaml_string += " " * indent + f"{key}: {value}\n"
|
||||
return yaml_string
|
||||
|
||||
Ссылка в новой задаче
Block a user