From 4a8d5038f0d2f3672bdca5593fbf86e35cc83054 Mon Sep 17 00:00:00 2001 From: Kurt Garloff Date: Mon, 18 Dec 2023 09:46:59 +0100 Subject: [PATCH] Handle invalid (also empty) gpu.gen entries. Signed-off-by: Kurt Garloff --- Tests/iaas/flavor-naming/flavor-name-describe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/iaas/flavor-naming/flavor-name-describe.py b/Tests/iaas/flavor-naming/flavor-name-describe.py index 6a7c72ec6..60c842ea2 100755 --- a/Tests/iaas/flavor-naming/flavor-name-describe.py +++ b/Tests/iaas/flavor-naming/flavor-name-describe.py @@ -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