CLI - Fix partition json output

Change-Id: I2b9e575cb960db7c136776bfe5c040b27feba727
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 4262802588]
This commit is contained in:
Galantsev, Dmitrii authored and Arif, Maisam committed 2025-06-19 10:34:57 -05:00
1 parent ed9086505d
commit 06b8484bbc
1 file changed
+11 -10
@@ -6461,16 +6461,17 @@ class AMDSMICommands():
self.logger.combine_arrays_to_json() self.logger.combine_arrays_to_json()
self.logger.clear_multiple_devices_output() self.logger.clear_multiple_devices_output()
# print legend if self.logger.is_human_readable_format():
legend_parts = [ # print legend
"\n\nLegend:", legend_parts = [
" * = Current mode"] "\n\nLegend:",
legend_output = "\n".join(legend_parts) " * = Current mode"]
if self.logger.destination == 'stdout': legend_output = "\n".join(legend_parts)
print(legend_output) if self.logger.destination == 'stdout':
else: print(legend_output)
with self.logger.destination.open('a', encoding="utf-8") as output_file: else:
output_file.write(legend_output + '\n') with self.logger.destination.open('a', encoding="utf-8") as output_file:
output_file.write(legend_output + '\n')
def ras(self, args, multiple_devices=False, gpu=None, cper=None, afid=None, def ras(self, args, multiple_devices=False, gpu=None, cper=None, afid=None,