From 8e3c92b589221bd1a6e0d7e4116c13aca245f432 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 8 May 2023 11:06:12 -0600 Subject: [PATCH] Handling when starting hotspot may keep WROLPi API from starting. --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 9a9ca185..5b49ce9a 100755 --- a/main.py +++ b/main.py @@ -135,9 +135,15 @@ def main(): # Hotspot/throttle are not supported in Docker containers. if not DOCKERIZED and config.hotspot_on_startup: - admin.enable_hotspot() + try: + admin.enable_hotspot() + except Exception as e: + logger.error('Failed to enable hotspot', exc_info=e) if not DOCKERIZED and config.throttle_on_startup: - admin.throttle_cpu_on() + try: + admin.throttle_cpu_on() + except Exception as e: + logger.error('Failed to throttle CPU', exc_info=e) check_media_directory()