Skip to content

Commit e0bf255

Browse files
committed
Remove unnecessary check for sys.getfilesystemencoding
1 parent ff57c04 commit e0bf255

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

git/compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
is_win = (os.name == 'nt')
3131
is_posix = (os.name == 'posix')
3232
is_darwin = (os.name == 'darwin')
33-
if hasattr(sys, 'getfilesystemencoding'):
34-
defenc = sys.getfilesystemencoding()
35-
if defenc is None:
36-
defenc = sys.getdefaultencoding()
33+
defenc = sys.getfilesystemencoding()
3734

3835
if PY3:
3936
import io

0 commit comments

Comments
 (0)