kopia lustrzana https://github.com/jbruce12000/kiln-controller
better instructions if get kiln_url fails
rodzic
ebfe218380
commit
1da733d117
|
@ -28,6 +28,12 @@ class Watcher(object):
|
||||||
try:
|
try:
|
||||||
r = requests.get(self.kiln_url,timeout=1)
|
r = requests.get(self.kiln_url,timeout=1)
|
||||||
return r.json()
|
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:
|
except:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue