From 52e71e6f769b307d88a452ce7b4d5e4b1def641d Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Wed, 11 Oct 2023 09:48:42 -0400 Subject: [PATCH] Only validate existing sceneries when necessary --- autoortho/__main__.py | 2 +- autoortho/autoortho.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/autoortho/__main__.py b/autoortho/__main__.py index b5b52245..028fdb45 100644 --- a/autoortho/__main__.py +++ b/autoortho/__main__.py @@ -26,7 +26,7 @@ def setuplogs(): ] ) log = logging.getLogger(__name__) - log.info(f"Setup logs: {log_dir}, level: {log_level}") + log.info(f"Setup logs: {log_dir}, log level: {log_level}") import autoortho diff --git a/autoortho/autoortho.py b/autoortho/autoortho.py index 698c688d..5ab0fe54 100644 --- a/autoortho/autoortho.py +++ b/autoortho/autoortho.py @@ -164,6 +164,10 @@ def __init__(self, cfg): self.mount_threads = [] def mount_sceneries(self, blocking=True): + if not self.cfg.scenery_mounts: + log.warning(f"No installed sceneries detected. Exiting.") + return + self.mounts_running = True for scenery in self.cfg.scenery_mounts: t = threading.Thread( @@ -318,9 +322,6 @@ def main(): stats = aostats.AOStats() - if not CFG.scenery_mounts: - log.warning(f"No installed sceneries detected. Exiting.") - sys.exit(0) import flighttrack ftrack = threading.Thread(