From 9fa5f71a762f53862a37253ec4c4b2af1e0e0031 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 10 Sep 2023 17:35:30 +0100 Subject: [PATCH] Make exception handler more robust --- hid_devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hid_devices.py b/hid_devices.py index 136a946..25001d2 100644 --- a/hid_devices.py +++ b/hid_devices.py @@ -171,7 +171,7 @@ def __init__(self, loop: asyncio.AbstractEventLoop): try: with open(DEVICES_CONFIG_FILE_NAME) as devices_config: self.devices_config: Dict[str, Dict[str, object]] = json.load(devices_config) - except: + except Exception: self.devices_config = {} self.devices: List[_Device] = [] self.capturing_devices: Dict[str, HIDDevice] = {}