summaryrefslogtreecommitdiff
path: root/git/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/compat.py')
-rw-r--r--git/compat.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git/compat.py b/git/compat.py
index 4a892ad2..f11d1423 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -27,12 +27,15 @@ defenc = sys.getdefaultencoding()
if PY3:
import io
FileType = io.IOBase
+ def byte_ord(b):
+ return b
else:
FileType = file
# usually, this is just ascii, which might not enough for our encoding needs
# Unless it's set specifically, we override it to be utf-8
if defenc == 'ascii':
defenc = 'utf-8'
+ byte_ord = ord
def with_metaclass(meta, *bases):
@@ -54,4 +57,3 @@ def with_metaclass(meta, *bases):
# end metaclass
return metaclass(meta.__name__ + 'Helper', None, {})
# end handle py2
-