From 70d050c9b0f67b62485a0dabe845aef249693304 Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Thu, 29 Feb 2024 14:54:40 +0100 Subject: [PATCH] Improved error handling for invalid configuration file --- intg-appletv/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intg-appletv/config.py b/intg-appletv/config.py index 393e8ea..95a0616 100644 --- a/intg-appletv/config.py +++ b/intg-appletv/config.py @@ -144,8 +144,8 @@ def load(self) -> bool: return True except OSError: _LOG.error("Cannot open the config file") - except ValueError: - _LOG.error("Empty or invalid config file") + except (ValueError, TypeError) as err: + _LOG.error("Empty or invalid config file: %s", err) return False