mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
use [WakaTime] namespace for all console messages
This commit is contained in:
parent
7a2c2b9750
commit
d6228b8dce
10
WakaTime.py
10
WakaTime.py
@ -59,10 +59,10 @@ def prompt_api_key():
|
|||||||
sublime.save_settings(SETTINGS_FILE)
|
sublime.save_settings(SETTINGS_FILE)
|
||||||
window = sublime.active_window()
|
window = sublime.active_window()
|
||||||
if window:
|
if window:
|
||||||
window.show_input_panel('Enter your WakaTime api key:', '', got_key, None, None)
|
window.show_input_panel('[WakaTime] Enter your wakatime.com api key:', '', got_key, None, None)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
print('Error: Could not prompt for api key because no window found.')
|
print('[WakaTime] Error: Could not prompt for api key because no window found.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ class SendActionThread(threading.Thread):
|
|||||||
|
|
||||||
def send(self):
|
def send(self):
|
||||||
if not self.api_key:
|
if not self.api_key:
|
||||||
print('missing api key')
|
print('[WakaTime] Error: missing api key.')
|
||||||
return
|
return
|
||||||
ua = 'sublime/%d sublime-wakatime/%s' % (ST_VERSION, __version__)
|
ua = 'sublime/%d sublime-wakatime/%s' % (ST_VERSION, __version__)
|
||||||
cmd = [
|
cmd = [
|
||||||
@ -140,7 +140,7 @@ class SendActionThread(threading.Thread):
|
|||||||
print(cmd)
|
print(cmd)
|
||||||
code = wakatime.main(cmd)
|
code = wakatime.main(cmd)
|
||||||
if code != 0:
|
if code != 0:
|
||||||
print('Error: Response code %d from wakatime package' % code)
|
print('[WakaTime] Error: Response code %d from wakatime package.' % code)
|
||||||
else:
|
else:
|
||||||
python = python_binary()
|
python = python_binary()
|
||||||
if python:
|
if python:
|
||||||
@ -153,7 +153,7 @@ class SendActionThread(threading.Thread):
|
|||||||
with open(join(expanduser('~'), '.wakatime.log'), 'a') as stderr:
|
with open(join(expanduser('~'), '.wakatime.log'), 'a') as stderr:
|
||||||
Popen(cmd, stderr=stderr)
|
Popen(cmd, stderr=stderr)
|
||||||
else:
|
else:
|
||||||
print('Error: Unable to find python binary.')
|
print('[WakaTime] Error: Unable to find python binary.')
|
||||||
|
|
||||||
|
|
||||||
def plugin_loaded():
|
def plugin_loaded():
|
||||||
|
Loading…
Reference in New Issue
Block a user