From a725ae078cda31531e09795e144f1b3bf5082027 Mon Sep 17 00:00:00 2001 From: "Kanangot Balakrishnan, Bindhiya" Date: Wed, 22 Jan 2025 18:06:13 -0600 Subject: [PATCH] [SWDEV-508042] Fix TypeError in specific clocks csv logging (#57) Logging specific clocks in csv format was causing TypeError as the levels were int. Fixed this by appending Level string at the beginning. Signed-off-by: Bindhiya Kanangot Balakrishnan [ROCm/amdsmi commit: e3e11835e44ee850d7ab6782c95088acb99e8f6e] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index e474a45dd5..848c2ee087 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -948,9 +948,9 @@ class AMDSMICommands(): for level in range(len(frequencies['frequency'])): if frequencies['frequency'][level] != "N/A": freq = str(self.helpers.convert_SI_unit(frequencies['frequency'][level], AMDSMIHelpers.SI_Unit.MICRO)) + " MHz" - freq_dict['frequency_levels'].update({level:freq}) + freq_dict['frequency_levels'].update({f"Level {level}":freq}) else: - freq_dict['frequency_levels'].update("N/A") + freq_dict['frequency_levels'].update({f"Level {level}":"N/A"}) else: freq_dict = "N/A" except amdsmi_exception.AmdSmiLibraryException as e: