Skip to content

Commit

Permalink
Merge pull request #411 from kubilus1/newcfgmounts
Browse files Browse the repository at this point in the history
Only validate existing sceneries when necessary
  • Loading branch information
kubilus1 authored Oct 11, 2023
2 parents 5c0b591 + 52e71e6 commit 6897712
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autoortho/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions autoortho/autoortho.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 6897712

Please sign in to comment.