From 4f21904013cd2bd204c28d146c3343df68878f36 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Wed, 17 Jul 2013 13:01:01 -0700 Subject: [PATCH] Version 0.2.6. Logging errors from background python program to ~/.wakatime.log --- sublime-wakatime.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sublime-wakatime.py b/sublime-wakatime.py index ac70d6d..7d84029 100644 --- a/sublime-wakatime.py +++ b/sublime-wakatime.py @@ -5,7 +5,7 @@ Maintainer: WakaTi.me Website: https://www.wakati.me/ ===========================================================""" -__version__ = '0.2.5' +__version__ = '0.2.6' import time import uuid @@ -62,7 +62,8 @@ def api(targetFile, timestamp, isWrite=False, endtime=0): if endtime: cmd.extend(['--endtime', str('%f' % endtime)]) #print(cmd) - Popen(cmd) + with open(expanduser('~/.wakatime.log'), 'a') as stderr: + Popen(cmd, stderr=stderr) LAST_ACTION = timestamp if endtime and endtime > LAST_ACTION: LAST_ACTION = endtime