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.
This commit is contained in:
Christian Breunig 2024-04-13 12:34:35 +02:00
parent 8c6e4798d3
commit 801def2d71

View File

@ -229,7 +229,7 @@ if __name__ == "__main__":
sys.exit(1) sys.exit(1)
# Validate characters in version name # Validate characters in version name
if 'version' in args: if 'version' in args and args['version'] != None:
allowed = string.ascii_letters + string.digits + '.' + '-' + '+' allowed = string.ascii_letters + string.digits + '.' + '-' + '+'
if not set(args['version']) <= set(allowed): if not set(args['version']) <= set(allowed):
print(f'Version contained illegal character(s), allowed: {allowed}') print(f'Version contained illegal character(s), allowed: {allowed}')