Skip to content

Commit

Permalink
Handle invalid (also empty) gpu.gen entries.
Browse files Browse the repository at this point in the history
Signed-off-by: Kurt Garloff <kurt@garloff.de>
  • Loading branch information
garloff committed Dec 18, 2023
1 parent 85d2ec0 commit 4a8d503
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tests/iaas/flavor-naming/flavor-name-describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def prettyname(item_list, prefix=""):
stg += "and " + tbl_out(gpu, "gputype")
stg += tbl_out(gpu, "brand")
stg += tbl_out(gpu, "perf", True)
stg += gpu.__getattribute__(f"tbl_brand_{gpu.brand}_gen")[gpu.gen] + " "
try:
stg += gpu.__getattribute__(f"tbl_brand_{gpu.brand}_gen")[gpu.gen] + " "
except KeyError:
pass
if hasattr(gpu, "cu") and gpu.cu:
stg += f"(w/ {gpu.cu} CU/EU/SM) "
# IB
Expand Down

0 comments on commit 4a8d503

Please sign in to comment.