Improve error handling
This commit is contained in:
parent
492dd716b9
commit
32790057a6
1 changed files with 1 additions and 1 deletions
|
@ -81,9 +81,9 @@ class UltimakerBot(Plugin):
|
||||||
if resp.status != 200:
|
if resp.status != 200:
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
rdata = await resp.text()
|
rdata = await resp.text()
|
||||||
|
now = json.loads(rdata)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
return None, False
|
return None, False
|
||||||
now = json.loads(rdata)
|
|
||||||
with open(self.config['poll'][cache_key], 'a+') as cache:
|
with open(self.config['poll'][cache_key], 'a+') as cache:
|
||||||
cache.seek(0)
|
cache.seek(0)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue