Test #6 - importing TimeoutError from socketio.exceptions...

This commit is contained in:
2025-08-06 13:10:40 -04:00
parent 4273a3265b
commit 1d68872fe0
@@ -2,7 +2,7 @@ import requests
from uptime_kuma_api.api import UptimeKumaApi, MonitorType from uptime_kuma_api.api import UptimeKumaApi, MonitorType
from auto_uptime_kuma.log import Log from auto_uptime_kuma.log import Log
from auto_uptime_kuma.config_service import ConfigService from auto_uptime_kuma.config_service import ConfigService
from socketio.exceptions import TimeoutError
class UptimeKumaService: class UptimeKumaService:
@@ -144,7 +144,7 @@ class UptimeKumaService:
try: try:
monitor = self.api.add_monitor(**monitor_data) monitor = self.api.add_monitor(**monitor_data)
except socketio.exceptions.TimeoutError: except TimeoutError:
Log.error("Timeout while trying to add monitor to Uptime Kuma. Is the server responsive?") Log.error("Timeout while trying to add monitor to Uptime Kuma. Is the server responsive?")
return None return None
except Exception as e: except Exception as e: