Skip to content

Commit

Permalink
fix: ensure app is set before attempting to operate on it
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltf24 authored and thw26 committed Oct 6, 2024
1 parent 9c3f5ff commit 2296b7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def ensure_product_choice(app=None):
m = f"{utils.get_calling_function_name()}: --install-app is broken"
logging.critical(m)
else:
if config.DIALOG == 'curses':
if config.DIALOG == 'curses' and app:
app.set_product(config.FLPRODUCT)

if config.FLPRODUCT == 'Logos':
Expand Down Expand Up @@ -66,7 +66,7 @@ def ensure_version_choice(app=None):
m = f"{utils.get_calling_function_name()}: --install-app is broken"
logging.critical(m)
else:
if config.DIALOG == 'curses':
if config.DIALOG == 'curses' and app:
app.set_version(config.TARGETVERSION)

logging.debug(f"> {config.TARGETVERSION=}")
Expand All @@ -90,7 +90,7 @@ def ensure_release_choice(app=None):
m = f"{utils.get_calling_function_name()}: --install-app is broken"
logging.critical(m)
else:
if config.DIALOG == 'curses':
if config.DIALOG == 'curses' and app:
app.set_release(config.TARGET_RELEASE_VERSION)

logging.debug(f"> {config.TARGET_RELEASE_VERSION=}")
Expand Down Expand Up @@ -121,7 +121,7 @@ def ensure_install_dir_choice(app=None):
m = f"{utils.get_calling_function_name()}: --install-app is broken"
logging.critical(m)
else:
if config.DIALOG == 'curses':
if config.DIALOG == 'curses' and app:
app.set_installdir(config.INSTALLDIR)

logging.debug(f"> {config.INSTALLDIR=}")
Expand Down Expand Up @@ -151,7 +151,7 @@ def ensure_wine_choice(app=None):
m = f"{utils.get_calling_function_name()}: --install-app is broken"
logging.critical(m)
else:
if config.DIALOG == 'curses':
if config.DIALOG == 'curses' and app:
app.set_wine(utils.get_wine_exe_path())

# Set WINEBIN_CODE and SELECTED_APPIMAGE_FILENAME.
Expand Down

0 comments on commit 2296b7b

Please sign in to comment.