Fix cmd windows popup when running under Windows.
This commit is contained in:
parent
4f21904013
commit
cc166ab27f
1 changed files with 7 additions and 2 deletions
|
@ -11,7 +11,7 @@ import time
|
||||||
import uuid
|
import uuid
|
||||||
from os.path import expanduser, dirname, realpath, isfile
|
from os.path import expanduser, dirname, realpath, isfile
|
||||||
from subprocess import call, Popen
|
from subprocess import call, Popen
|
||||||
|
import platform
|
||||||
import sublime
|
import sublime
|
||||||
import sublime_plugin
|
import sublime_plugin
|
||||||
|
|
||||||
|
@ -51,7 +51,12 @@ def api(targetFile, timestamp, isWrite=False, endtime=0):
|
||||||
if not targetFile:
|
if not targetFile:
|
||||||
targetFile = LAST_FILE
|
targetFile = LAST_FILE
|
||||||
if targetFile:
|
if targetFile:
|
||||||
cmd = ['python', API_CLIENT,
|
|
||||||
|
python_cmd = 'python'
|
||||||
|
if(platform.system() == 'Windows'):
|
||||||
|
python_cmd = 'pythonw'
|
||||||
|
|
||||||
|
cmd = [python_cmd, API_CLIENT,
|
||||||
'--file', targetFile,
|
'--file', targetFile,
|
||||||
'--time', str('%f' % timestamp),
|
'--time', str('%f' % timestamp),
|
||||||
'--plugin', 'sublime-wakatime/%s' % __version__,
|
'--plugin', 'sublime-wakatime/%s' % __version__,
|
||||||
|
|
Loading…
Reference in a new issue