Handling when starting hotspot may keep WROLPi API from starting.

This commit is contained in:
Roland 2023-05-08 11:06:12 -06:00
parent b7cf7ca27d
commit 8e3c92b589
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

10
main.py
View file

@ -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()