upgrade wakatime-cli to v4.1.13
This commit is contained in:
parent
d0ddbed006
commit
c7efc33463
3 changed files with 7 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
__title__ = 'wakatime'
|
__title__ = 'wakatime'
|
||||||
__description__ = 'Common interface to the WakaTime api.'
|
__description__ = 'Common interface to the WakaTime api.'
|
||||||
__url__ = 'https://github.com/wakatime/wakatime'
|
__url__ = 'https://github.com/wakatime/wakatime'
|
||||||
__version_info__ = ('4', '1', '11')
|
__version_info__ = ('4', '1', '13')
|
||||||
__version__ = '.'.join(__version_info__)
|
__version__ = '.'.join(__version_info__)
|
||||||
__author__ = 'Alan Hamlett'
|
__author__ = 'Alan Hamlett'
|
||||||
__author_email__ = 'alan@wakatime.com'
|
__author_email__ = 'alan@wakatime.com'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
__copyright__ = 'Copyright 2016 Alan Hamlett'
|
||||||
|
|
|
@ -14,3 +14,4 @@ SUCCESS = 0
|
||||||
API_ERROR = 102
|
API_ERROR = 102
|
||||||
CONFIG_FILE_PARSE_ERROR = 103
|
CONFIG_FILE_PARSE_ERROR = 103
|
||||||
AUTH_ERROR = 104
|
AUTH_ERROR = 104
|
||||||
|
UNKNOWN_ERROR = 105
|
||||||
|
|
|
@ -36,6 +36,7 @@ from .constants import (
|
||||||
AUTH_ERROR,
|
AUTH_ERROR,
|
||||||
CONFIG_FILE_PARSE_ERROR,
|
CONFIG_FILE_PARSE_ERROR,
|
||||||
SUCCESS,
|
SUCCESS,
|
||||||
|
UNKNOWN_ERROR,
|
||||||
)
|
)
|
||||||
from .logger import setup_logging
|
from .logger import setup_logging
|
||||||
from .offlinequeue import Queue
|
from .offlinequeue import Queue
|
||||||
|
@ -345,7 +346,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None,
|
||||||
'Authorization': auth,
|
'Authorization': auth,
|
||||||
}
|
}
|
||||||
if hostname:
|
if hostname:
|
||||||
headers['X-Machine-Name'] = u(hostname)
|
headers['X-Machine-Name'] = u(hostname).encode('utf-8')
|
||||||
proxies = {}
|
proxies = {}
|
||||||
if proxy:
|
if proxy:
|
||||||
proxies['https'] = proxy
|
proxies['https'] = proxy
|
||||||
|
@ -356,7 +357,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None,
|
||||||
except:
|
except:
|
||||||
tz = None
|
tz = None
|
||||||
if tz:
|
if tz:
|
||||||
headers['TimeZone'] = u(tz.zone)
|
headers['TimeZone'] = u(tz.zone).encode('utf-8')
|
||||||
|
|
||||||
session_cache = SessionCache()
|
session_cache = SessionCache()
|
||||||
session = session_cache.get()
|
session = session_cache.get()
|
||||||
|
@ -499,3 +500,4 @@ def execute(argv=None):
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
except:
|
except:
|
||||||
log.traceback()
|
log.traceback()
|
||||||
|
return UNKNOWN_ERROR
|
||||||
|
|
Loading…
Reference in a new issue