Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,21 @@ def main() -> None:
parser = create_argument_parser(PROFILES, VOLATILE, MODULES)
args = parse_acquire_args(parser, config=CONFIG)

# start GUI if requested through CLI / config
flavour = None
if args.gui == "always" or (
args.gui == "depends" and os.environ.get("PYS_KEYSOURCE") == "prompt" and len(sys.argv) == 1
):
flavour = platform.system()

acquire_gui = GUI(flavour=flavour, upload_available=args.auto_upload)
args.output, args.auto_upload, cancel = acquire_gui.wait_for_start(args)

if cancel:
parser.exit(0)

# From here onwards, the GUI will be locked and cannot be closed because we're acquiring

try:
check_and_set_log_args(args)
except ValueError as err:
Expand All @@ -2101,20 +2116,6 @@ def main() -> None:
log.info("Default Arguments: %s", " ".join(args.config.get("arguments")))
log.info("")

# start GUI if requested through CLI / config
flavour = None
if args.gui == "always" or (
args.gui == "depends" and os.environ.get("PYS_KEYSOURCE") == "prompt" and len(sys.argv) == 1
):
flavour = platform.system()

acquire_gui = GUI(flavour=flavour, upload_available=args.auto_upload)
args.output, args.auto_upload, cancel = acquire_gui.wait_for_start(args)

if cancel:
parser.exit(0)
# From here onwards, the GUI will be locked and cannot be closed because we're acquiring

plugins_to_load = [("cloud", MinIO)]
upload_plugins = UploaderRegistry("acquire.plugins", plugins_to_load)

Expand Down