From a19e635ba359405bd2c2e14b1189c1fb7a2e77dc Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 30 Sep 2013 07:04:24 -0700 Subject: [PATCH] print response code in Sublime Console if api request failed --- WakaTime.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WakaTime.py b/WakaTime.py index 190a3c1..1f9e2ba 100644 --- a/WakaTime.py +++ b/WakaTime.py @@ -162,9 +162,11 @@ class SendActionThread(threading.Thread): if self.debug: cmd.append('--verbose') if HAS_SSL: - wakatime.main(cmd) if self.debug: print(cmd) + code = wakatime.main(cmd) + if code != 0: + print('Error: Response code %d from wakatime package' % code) else: cmd.insert(0, python_binary()) if self.debug: