diff --git a/wakatime/projects/git.py b/wakatime/projects/git.py index 7670bc9..ae433d5 100644 --- a/wakatime/projects/git.py +++ b/wakatime/projects/git.py @@ -22,6 +22,13 @@ except ImportError: log = logging.getLogger(__name__) +# str is unicode in Python3 +try: + unicode +except NameError: + unicode = str + + class Git(BaseProject): def process(self): diff --git a/wakatime/projects/projectmap.py b/wakatime/projects/projectmap.py index 77ac5ea..ea5ceff 100644 --- a/wakatime/projects/projectmap.py +++ b/wakatime/projects/projectmap.py @@ -29,6 +29,13 @@ from .base import BaseProject log = logging.getLogger(__name__) +# str is unicode in Python3 +try: + unicode +except NameError: + unicode = str + + class ProjectMap(BaseProject): def process(self): diff --git a/wakatime/projects/subversion.py b/wakatime/projects/subversion.py index e39db67..9a4c205 100644 --- a/wakatime/projects/subversion.py +++ b/wakatime/projects/subversion.py @@ -24,6 +24,13 @@ except ImportError: log = logging.getLogger(__name__) +# str is unicode in Python3 +try: + unicode +except NameError: + unicode = str + + class Subversion(BaseProject): def process(self): diff --git a/wakatime/projects/wakatime.py b/wakatime/projects/wakatime.py index db9ed56..6eea2a7 100644 --- a/wakatime/projects/wakatime.py +++ b/wakatime/projects/wakatime.py @@ -20,6 +20,13 @@ from .base import BaseProject log = logging.getLogger(__name__) +# str is unicode in Python3 +try: + unicode +except NameError: + unicode = str + + class WakaTime(BaseProject): def process(self):