Codebase list oslo-sphinx / 10d5529
Fix a string vs bytes issue in _guess_cgit_link subprocess.check_output returns bytes, so we end up using '+' on a text string (CGIT_BASE) and bytes (the output of parsed.path) in _guess_cgit_link. Make sure we decode 'git_remote' in Python 3. Change-Id: I9e846e2192ead41ca2328b8aa20994742096c51e Closes-Bug: #1517525 Cyril Roelandt 8 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1212 # under the License.
1313
1414 import os
15 import six
1516 from six.moves.urllib import parse
1617 import subprocess
1718
2728 except subprocess.CalledProcessError:
2829 return None
2930 else:
31 if six.PY3:
32 git_remote = os.fdecode(git_remote)
3033 parsed = parse.urlparse(git_remote)
3134 return CGIT_BASE + parsed.path.lstrip('/')
3235