summaryrefslogtreecommitdiff
path: root/scripts/image-build/build-vyos-image
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-13 12:34:35 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-13 12:34:35 +0200
commit801def2d7105acc45868c361730e5be5ab4c36ea (patch)
treea56561864336a360257796d32e3bacda516a1148 /scripts/image-build/build-vyos-image
parent8c6e4798d3044e0d4d864e6c2a0ad3ccedfebbfb (diff)
downloadvyos-build-801def2d7105acc45868c361730e5be5ab4c36ea.tar.gz
vyos-build-801def2d7105acc45868c361730e5be5ab4c36ea.zip
T6173: fix TypeError: 'NoneType' object is not iterable
Commit 611cfc85c531 ("T6173: validate allowed characters in ISO image name") missed the probability that version is a dict member bot empty.
Diffstat (limited to 'scripts/image-build/build-vyos-image')
-rwxr-xr-xscripts/image-build/build-vyos-image2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image
index 3b265a01..e41b3eff 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -229,7 +229,7 @@ if __name__ == "__main__":
sys.exit(1)
# Validate characters in version name
- if 'version' in args:
+ if 'version' in args and args['version'] != None:
allowed = string.ascii_letters + string.digits + '.' + '-' + '+'
if not set(args['version']) <= set(allowed):
print(f'Version contained illegal character(s), allowed: {allowed}')