diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 16:44:54 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 16:44:54 +0100 |
commit | 8a308613467a1510f8dac514624abae4e10c0779 (patch) | |
tree | 6c703cb00875ca77972b6250db8b63800a051502 /git/compat.py | |
parent | 3d0556a31916a709e9da3eafb92fc6b8bf69896c (diff) | |
download | gitpython-8a308613467a1510f8dac514624abae4e10c0779.tar.gz |
Fixes test_blob and improved commit writing/reading
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 4 |
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 - |