diff --git a/git_refs.py b/git_refs.py index 58c838a6..7feaffb1 100644 --- a/git_refs.py +++ b/git_refs.py @@ -139,7 +139,7 @@ class GitRefs(object): def _ReadLoose1(self, path, name): try: - fd = open(path, 'rb') + fd = open(path) except IOError: return diff --git a/project.py b/project.py index 4eca9b67..d4c5afd5 100644 --- a/project.py +++ b/project.py @@ -1258,7 +1258,7 @@ class Project(object): if is_new: alt = os.path.join(self.gitdir, 'objects/info/alternates') try: - fd = open(alt, 'rb') + fd = open(alt) try: alt_dir = fd.readline().rstrip() finally: @@ -2691,11 +2691,11 @@ class Project(object): else: path = os.path.join(self._project.worktree, '.git', HEAD) try: - fd = open(path, 'rb') + fd = open(path) except IOError as e: raise NoManifestException(path, str(e)) try: - line = fd.read() + line = fd.readline() finally: fd.close() try: