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) time.sleep(delta)
r = requests.get(base, headers=header).json() r = requests.get(base, headers=header).json()
self.last_q = time.time() self.last_q = time.time()
cherrypy.log('Request: OK')
except: except:
cherrypy.log('Request: FAIL') cherrypy.log('Request: FAIL')
r = None r = None
finally: finally:
cherrypy.log('Request: OK')
self.lock.release() self.lock.release()
return r return r