Skip to content

Commit 3ba6727

Browse files
authored
[None][test] Update get_sysinfo.py to avoid UnboundLocalError (#7982)
Signed-off-by: yufeiwu <[email protected]> Signed-off-by: yufeiwu-nv <[email protected]>
1 parent b2095aa commit 3ba6727

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/defs/sysinfo/get_sysinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ def construct_gpu_properties(mako_opts, device_index=0):
180180
if pci_device_id is not None and chip_name_mapping:
181181
entity = str(pci_device_id).lower()
182182
if entity in chip_name_mapping:
183-
chip = str(chip_name_mapping[entity]).lower()
183+
chip = str(chip_name_mapping[entity])
184+
full_name = "{} BRING-UP BOARD".format(chip.upper())
184185
else:
185186
err_msg = r"Could not find a chip name associated with this device id - {}. Chip name won't be reported".format(
186187
entity)
187188
logger.warning(err_msg)
188-
full_name = "{} Bring-up Board".format(chip.upper())
189189

190190
gpu_name = full_name.replace("NVIDIA", "").strip().upper()
191191
assert gpu_name != "", "device_product_name is empty after removing substring 'NVIDIA' and leading/trailing whitespaces."

0 commit comments

Comments
 (0)