From 5236b720ab2e09faebe9c768b67504d4285bb10f Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Fri, 5 Jan 2018 12:07:09 -0500 Subject: [PATCH] Catch everything when calling to OctoPrint API to fix #10557 (#11457) --- homeassistant/components/octoprint.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/octoprint.py b/homeassistant/components/octoprint.py index f3e3ecc29b2..5caaa1b372d 100644 --- a/homeassistant/components/octoprint.py +++ b/homeassistant/components/octoprint.py @@ -117,9 +117,7 @@ class OctoPrintAPI(object): self.job_error_logged = False self.printer_error_logged = False return response.json() - except (requests.exceptions.ConnectionError, - requests.exceptions.HTTPError, - requests.exceptions.ReadTimeout) as conn_exc: + except Exception as conn_exc: # pylint: disable=broad-except log_string = "Failed to update OctoPrint status. " + \ " Error: %s" % (conn_exc) # Only log the first failure