Fixed bug when OK-logmessage would print even in fail request

This commit is contained in:
2017-10-17 23:17:17 +03:00
parent 3ad3b43e24
commit 64cc6ef2f1

View file

@ -27,11 +27,11 @@ class TwitchClient:
time.sleep(delta)
r = requests.get(base, headers=header).json()
self.last_q = time.time()
cherrypy.log('Request: OK')
except:
cherrypy.log('Request: FAIL')
r = None
finally:
cherrypy.log('Request: OK')
self.lock.release()
return r