From dd9849e6c89e9effca322c875e51f759d6af7281 Mon Sep 17 00:00:00 2001 From: Core447 Date: Mon, 12 Feb 2024 13:06:32 +0100 Subject: [PATCH] Catch: Backend crash if port is undefined --- backend/OBSController.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/OBSController.py b/backend/OBSController.py index 4436633..d0cf1d2 100644 --- a/backend/OBSController.py +++ b/backend/OBSController.py @@ -29,7 +29,9 @@ class OBSController(obsws): self.event_obs = obsws(host=host, port=port, timeout=timeout, legacy=not legacy, on_connect=self.on_connect, on_disconnect=self.on_disconnect, authreconnect=True, **kwargs) self.connect() log.info("Successfully connected to OBS") - except obswebsocket.exceptions.ConnectionFailure as e: + + # ValueError: invalid port etc + except (obswebsocket.exceptions.ConnectionFailure, ValueError) as e: log.error(f"Failed to connect to OBS: {e}")