summaryrefslogtreecommitdiff
path: root/git/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/compat.py')
-rw-r--r--git/compat.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/git/compat.py b/git/compat.py
index f11d1423..b9205418 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -29,6 +29,8 @@ if PY3:
FileType = io.IOBase
def byte_ord(b):
return b
+ def bchr(n):
+ return bytes([n])
else:
FileType = file
# usually, this is just ascii, which might not enough for our encoding needs
@@ -36,6 +38,7 @@ else:
if defenc == 'ascii':
defenc = 'utf-8'
byte_ord = ord
+ bchr = chr
def with_metaclass(meta, *bases):