upgrade wakatime cli to v4.1.8

This commit is contained in:
Alan Hamlett
2015-09-29 03:11:25 -07:00
parent 16bbe21be9
commit 192a5c7aa7
28 changed files with 423 additions and 318 deletions

View File

@ -30,7 +30,7 @@ class Git(BaseProject):
base = self._project_base()
if base:
return u(os.path.basename(base))
return None
return None # pragma: nocover
def branch(self):
base = self._project_base()
@ -39,13 +39,13 @@ class Git(BaseProject):
try:
with open(head, 'r', encoding='utf-8') as fh:
return u(fh.readline().strip().rsplit('/', 1)[-1])
except UnicodeDecodeError:
except UnicodeDecodeError: # pragma: nocover
try:
with open(head, 'r', encoding=sys.getfilesystemencoding()) as fh:
return u(fh.readline().strip().rsplit('/', 1)[-1])
except:
log.exception("Exception:")
except IOError:
except IOError: # pragma: nocover
log.exception("Exception:")
return None