diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-07-20 15:33:28 +0800 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-07-20 15:34:18 +0800 |
commit | 74a0507f4eb468b842d1f644f0e43196cda290a1 (patch) | |
tree | 80bb820ffa088a42e6d05cf6f7cdfbbaa5da06fe /git/compat.py | |
parent | cc664f07535e3b3c1884d0b7f3cbcbadf9adce25 (diff) | |
download | gitpython-74a0507f4eb468b842d1f644f0e43196cda290a1.tar.gz |
This time, use test-requirements.
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git/compat.py b/git/compat.py index b63768f3..02dc69de 100644 --- a/git/compat.py +++ b/git/compat.py @@ -30,7 +30,10 @@ PY3 = sys.version_info[0] >= 3 is_win = (os.name == 'nt') is_posix = (os.name == 'posix') is_darwin = (os.name == 'darwin') -defenc = sys.getdefaultencoding() +if hasattr(sys, 'getfilesystemencoding'): + defenc = sys.getfilesystemencoding() +if defenc is None: + defenc = sys.getdefaultencoding() if PY3: import io |