diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 10:09:51 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 10:09:51 +0100 |
commit | bc8c91200a7fb2140aadd283c66b5ab82f9ad61e (patch) | |
tree | 54f8b4e09ae36f465da25ecd16d6377a2a8414a8 /git/objects/commit.py | |
parent | ae2ff0f9d704dc776a1934f72a339da206a9fff4 (diff) | |
download | gitpython-bc8c91200a7fb2140aadd283c66b5ab82f9ad61e.tar.gz |
Fixed io types to make tests work on PY2 once again.py3
Now it's about going through PY3 issues
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index c9d7ddc8..79d460ad 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -30,7 +30,7 @@ from time import ( altzone ) import os -from io import StringIO +from io import BytesIO import logging log = logging.getLogger('git.objects.commit') @@ -133,7 +133,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): if attr in Commit.__slots__: # read the data in a chunk, its faster - then provide a file wrapper binsha, typename, self.size, stream = self.repo.odb.stream(self.binsha) - self._deserialize(StringIO(stream.read())) + self._deserialize(BytesIO(stream.read())) else: super(Commit, self)._set_cache_(attr) # END handle attrs @@ -345,7 +345,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): committer, committer_time, committer_offset, message, parent_commits, conf_encoding) - stream = StringIO() + stream = BytesIO() new_commit._serialize(stream) streamlen = stream.tell() stream.seek(0) |