Skip to content

Commit

Permalink
Handle case without generation (GPU, CPUvendor).
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 d7fb970 commit b3f38e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tests/iaas/flavor-naming/flavor-form.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ def generate_name(form):
for spec in FLAVOR_SPEC:
if spec.pnames[0][0] == '.' and not getattr(spec, spec.pattrs[0]):
spec.parsed = 0
if "perf" in spec.pnames:
if "perf" in spec.pattrs:
setattr(spec, "perf", "")
if "gen" in spec.pnames:
if "gen" in spec.pattrs:
setattr(spec, "gen", "")
elif "gen" in spec.pattrs and not hasattr(spec, "gen"):
setattr(spec, "gen", "")
print(f'{spec.type}:gen=""', file=sys.stderr)

# Debugging
print(*FLAVOR_SPEC, file=sys.stderr, sep='\n')
try:
Expand Down

0 comments on commit b3f38e0

Please sign in to comment.