From 08010e86fe66381edaa33a81c33fe676e3a4131a Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 30 Jul 2013 16:23:12 -0700 Subject: [PATCH] removed --list option for older git installations. using sys.version_info as tuple for python 2.6 support. --- wakatime/__init__.py | 3 +-- wakatime/projects/git.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wakatime/__init__.py b/wakatime/__init__.py index 05b0214..9db5416 100644 --- a/wakatime/__init__.py +++ b/wakatime/__init__.py @@ -111,8 +111,7 @@ def get_api_key(configFile): def get_user_agent(plugin): ver = sys.version_info - python_version = '%d.%d.%d.%s.%d' % (ver.major, ver.minor, ver.micro, - ver.releaselevel, ver.serial) + python_version = '%d.%d.%d.%s.%d' % (ver[0], ver[1], ver[2], ver[3], ver[4]) user_agent = 'wakatime/%s (%s) Python%s' % (__version__, platform.platform(), python_version) if plugin: diff --git a/wakatime/projects/git.py b/wakatime/projects/git.py index 2feef1e..8a52dcb 100644 --- a/wakatime/projects/git.py +++ b/wakatime/projects/git.py @@ -63,7 +63,7 @@ class Git(BaseProject): stdout = None try: stdout, stderr = Popen([ - 'git', 'branch', '--no-color', '--list' + 'git', 'branch', '--no-color' ], stdout=PIPE, stderr=PIPE, cwd=self._project_base() ).communicate() except OSError: