From 8ce92bb998180a26263099af5917ec3f300d2f1d Mon Sep 17 00:00:00 2001 From: Core447 Date: Mon, 12 Feb 2024 13:59:01 +0100 Subject: [PATCH] Fix: Controller crash if port is None --- backend/OBSController.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/OBSController.py b/backend/OBSController.py index d0cf1d2..6f77eb6 100644 --- a/backend/OBSController.py +++ b/backend/OBSController.py @@ -22,7 +22,7 @@ class OBSController(obsws): self.event_obs = obsws(host=host, port=port, timeout=timeout, legacy=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: + except (obswebsocket.exceptions.ConnectionFailure, ValueError) as e: try: log.error(f"Failed to connect to OBS with legacy: {legacy}, trying with legacy: {not legacy}") super().__init__(host=host, port=port, timeout=timeout, legacy=not legacy, on_connect=self.on_connect, on_disconnect=self.on_disconnect, authreconnect=True, **kwargs)