Skip to content

Commit

Permalink
Merge pull request #70 from mashb1t/develop
Browse files Browse the repository at this point in the history
fix: add handling for default "None" value of default_ip_image_*
  • Loading branch information
mashb1t authored Aug 7, 2024
2 parents 461c178 + 80d406f commit b06fc19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,14 @@ def init_temp_path(path: str | None, default_path: str) -> str:
image_count += 1
default_ip_images[image_count] = get_config_item_or_set_default(
key=f'default_ip_image_{image_count}',
default_value=None,
validator=lambda x: x is None or isinstance(x, str) and os.path.exists(x),
default_value='None',
validator=lambda x: x == 'None' or isinstance(x, str) and os.path.exists(x),
expected_type=str
)

if default_ip_images[image_count] == 'None':
default_ip_images[image_count] = None

default_ip_types[image_count] = get_config_item_or_set_default(
key=f'default_ip_type_{image_count}',
default_value=modules.flags.default_ip,
Expand Down

0 comments on commit b06fc19

Please sign in to comment.