From 64cc6ef2f113a328aa2c3988d54c540761d536a9 Mon Sep 17 00:00:00 2001 From: Date: Tue, 17 Oct 2017 23:17:17 +0300 Subject: [PATCH] Fixed bug when OK-logmessage would print even in fail request --- src/twitch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twitch.py b/src/twitch.py index 78b75a4..8dac1a2 100644 --- a/src/twitch.py +++ b/src/twitch.py @@ -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