| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d3e1078 commit 27fcca1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,7 +76,7 @@ def abspath(self): | |||
| 76 | 76 | @classmethod | |
| 77 | 77 | def _get_packed_refs_path(cls, repo): | |
| 78 | 78 | try: | |
| 79 | - commondir = codecs.open(osp.join(repo.git_dir, 'commondir'), 'rt', encoding="utf-8").readlines()[0].strip() | ||
| 79 | + commondir = codecs.open(osp.join(repo.git_dir, 'commondir'), 'r', encoding="utf-8").readlines()[0].strip() | ||
| 80 | 80 | except (OSError, IOError): | |
| 81 | 81 | commondir = '.' | |
| 82 | 82 | repodir = osp.join(repo.git_dir, commondir) | |
@@ -87,7 +87,7 @@ def _iter_packed_refs(cls, repo): | |||
| 87 | 87 | """Returns an iterator yielding pairs of sha1/path pairs (as bytes) for the corresponding refs. | |
| 88 | 88 | :note: The packed refs file will be kept open as long as we iterate""" | |
| 89 | 89 | try: | |
| 90 | - with codecs.open(cls._get_packed_refs_path(repo), 'rt', encoding="utf-8") as fp: | ||
| 90 | + with codecs.open(cls._get_packed_refs_path(repo), 'r', encoding="utf-8") as fp: | ||
| 91 | 91 | for line in fp: | |
| 92 | 92 | line = line.strip() | |
| 93 | 93 | if not line: | |
@@ -133,7 +133,7 @@ def _get_ref_info_helper(cls, repo, repodir, ref_path): | |||
| 133 | 133 | point to, or None""" | |
| 134 | 134 | tokens = None | |
| 135 | 135 | try: | |
| 136 | - with codecs.open(osp.join(repodir, ref_path), 'rt', encoding="utf-8") as fp: | ||
| 136 | + with codecs.open(osp.join(repodir, ref_path), 'r', encoding="utf-8") as fp: | ||
| 137 | 137 | value = fp.read().rstrip() | |
| 138 | 138 | # Don't only split on spaces, but on whitespace, which allows to parse lines like | |
| 139 | 139 | # 60b64ef992065e2600bfef6187a97f92398a9144 branch 'master' of git-server:/path/to/repo | |
@@ -173,7 +173,7 @@ def _get_ref_info(cls, repo, ref_path): | |||
| 173 | 173 | return cls._get_ref_info_helper(repo, repo.git_dir, ref_path) | |
| 174 | 174 | except ValueError: | |
| 175 | 175 | try: | |
| 176 | - commondir = codecs.open(osp.join(repo.git_dir, 'commondir'), 'rt', encoding="utf-8").readlines()[0].strip() | ||
| 176 | + commondir = codecs.open(osp.join(repo.git_dir, 'commondir'), 'r', encoding="utf-8").readlines()[0].strip() | ||
| 177 | 177 | except (OSError, IOError): | |
| 178 | 178 | commondir = '.' | |
| 179 | 179 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments