Skip to content

Commit db7a028

Browse files
authored
Bugfix: standard-images-check ABORTing when image_source not set (#1009)
Correct behavior is to FAIL, not ABORT. Signed-off-by: Matthias Büchse <[email protected]>
1 parent d362fc9 commit db7a028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/iaas/scs_0104_standard_images/standard_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ def compute_scs_0104_source(image_lookup, image_spec):
7272
matches = _lookup_images(image_lookup, image_spec)
7373
errors = 0
7474
for image in matches:
75-
img_source = image.properties['image_source']
75+
img_source = image.properties.get('image_source', '')
7676
sources = image_spec['source']
7777
if not isinstance(sources, (tuple, list)):
7878
sources = [sources]
7979
if not any(img_source.startswith(src) for src in sources):
8080
errors += 1
81-
logger.error(f"Image '{image.name}' source mismatch: {img_source} matches none of these prefixes: {', '.join(sources)}")
81+
logger.error(f"Image '{image.name}' source mismatch: '{img_source}' matches none of these prefixes: {', '.join(sources)}")
8282
return not errors
8383

8484

0 commit comments

Comments
 (0)