diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:11:34 +0100 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:11:34 +0100 |
| commit | 56e942318f3c493c8dcd4759f806034331ebeda5 (patch) | |
| tree | 82cdca65cd197f36ea3680171186e0ddcf234266 /git/objects/tag.py | |
| parent | d46e3fe9cb0dea2617cd9231d29bf6919b0f1e91 (diff) | |
| parent | 68f8a43d1b643318732f30ee1cd75e1d315a4537 (diff) | |
| download | GitPython-56e942318f3c493c8dcd4759f806034331ebeda5.tar.gz GitPython-56e942318f3c493c8dcd4759f806034331ebeda5.zip | |
Merge branch 'py3' into 0.3
Conflicts:
git/refs/log.py
Diffstat (limited to 'git/objects/tag.py')
| -rw-r--r-- | git/objects/tag.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/git/objects/tag.py b/git/objects/tag.py index 3c379579..c8684447 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -4,12 +4,13 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php """ Module containing all object based types. """ -import base -from gitdb.util import hex_to_bin -from util import ( +from . import base +from .util import ( get_object_type_by_name, parse_actor_and_date ) +from gitdb.util import hex_to_bin +from git.compat import defenc __all__ = ("TagObject", ) @@ -52,11 +53,12 @@ class TagObject(base.Object): """Cache all our attributes at once""" if attr in TagObject.__slots__: ostream = self.repo.odb.stream(self.binsha) - lines = ostream.read().splitlines() + lines = ostream.read().decode(defenc).splitlines() obj, hexsha = lines[0].split(" ") # object <hexsha> type_token, type_name = lines[1].split(" ") # type <type_name> - self.object = get_object_type_by_name(type_name)(self.repo, hex_to_bin(hexsha)) + self.object = \ + get_object_type_by_name(type_name.encode('ascii'))(self.repo, hex_to_bin(hexsha)) self.tag = lines[2][4:] # tag <tag name> |
