Skip to content

Commit b06fc19

Browse files
authored
Merge pull request #70 from mashb1t/develop
fix: add handling for default "None" value of default_ip_image_*
2 parents 461c178 + 80d406f commit b06fc19

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/config.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,14 @@ def init_temp_path(path: str | None, default_path: str) -> str:
520520
image_count += 1
521521
default_ip_images[image_count] = get_config_item_or_set_default(
522522
key=f'default_ip_image_{image_count}',
523-
default_value=None,
524-
validator=lambda x: x is None or isinstance(x, str) and os.path.exists(x),
523+
default_value='None',
524+
validator=lambda x: x == 'None' or isinstance(x, str) and os.path.exists(x),
525525
expected_type=str
526526
)
527+
528+
if default_ip_images[image_count] == 'None':
529+
default_ip_images[image_count] = None
530+
527531
default_ip_types[image_count] = get_config_item_or_set_default(
528532
key=f'default_ip_type_{image_count}',
529533
default_value=modules.flags.default_ip,

0 commit comments

Comments
 (0)