From 1da733d117e3c4c660c9f63e18ae4905a9d6ecf1 Mon Sep 17 00:00:00 2001 From: jbruce12000 Date: Mon, 23 May 2022 18:19:43 -0400 Subject: [PATCH] better instructions if get kiln_url fails --- watcher.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/watcher.py b/watcher.py index 3aad230..323e2fa 100755 --- a/watcher.py +++ b/watcher.py @@ -28,6 +28,12 @@ class Watcher(object): try: r = requests.get(self.kiln_url,timeout=1) return r.json() + except requests.exceptions.Timeout: + log.error("network timeout. check kiln_url and port.") + return {} + except requests.exceptions.ConnectionError: + log.error("network connection error. check kiln_url and port.") + return {} except: return {}