upgrade wakatime cli to v4.1.1

This commit is contained in:
Alan Hamlett
2015-08-25 00:42:37 -07:00
parent b07b59e0c8
commit 7ea51d09ba
40 changed files with 622 additions and 448 deletions

View File

@@ -13,6 +13,7 @@
import logging
import os
import sys
from .base import BaseProject
from ..compat import u, open
@@ -34,6 +35,13 @@ class WakaTimeProjectFile(BaseProject):
with open(self.config, 'r', encoding='utf-8') as fh:
self._project_name = u(fh.readline().strip())
self._project_branch = u(fh.readline().strip())
except UnicodeDecodeError:
try:
with open(self.config, 'r', encoding=sys.getfilesystemencoding()) as fh:
self._project_name = u(fh.readline().strip())
self._project_branch = u(fh.readline().strip())
except:
log.exception("Exception:")
except IOError:
log.exception("Exception:")