including python version in user agent string

This commit is contained in:
Alan Hamlett 2013-07-23 17:49:16 -07:00
parent 24ebff0d3e
commit 23cd9b2991

View file

@ -103,7 +103,10 @@ def get_api_key(configFile):
def get_user_agent(plugin): def get_user_agent(plugin):
user_agent = 'wakatime/%s (%s)' % (__version__, platform.platform()) python_version = '%d.%d.%d.%s.%d' % (v.major, v.minor, v.micro,
v.releaselevel, v.serial)
user_agent = 'wakatime/%s (%s) Python%s' % (__version__,
python_version, platform.platform())
if plugin: if plugin:
user_agent = user_agent+' '+plugin user_agent = user_agent+' '+plugin
return user_agent return user_agent