From 968c17a357eeb40a1450bb625d129e8d2c67a28d Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Fri, 15 Jul 2016 16:29:53 -0500 Subject: [PATCH] Catch ConnectionResetError when making API request Caught this traceback in the log when an update failed to complete. Also added a generic Exception catch-all. --- i3pystatus/scores/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/scores/__init__.py b/i3pystatus/scores/__init__.py index c4ba7e7..142b8af 100644 --- a/i3pystatus/scores/__init__.py +++ b/i3pystatus/scores/__init__.py @@ -76,7 +76,7 @@ class ScoresBackend(SettingsBase): exc.code, exc.reason, exc.url, ) return {} - except URLError as exc: + except (ConnectionResetError, URLError) as exc: self.logger.critical('Error making request to %s: %s', url, exc) return {}