Subprocess returns bytes in py3

When later used the current code will break in
python3 due to:

TypeError: 'str' does not support the buffer
           interface

Change-Id: I11572dd510ce8255ed66de56d5d9000755f7fee2
This commit is contained in:
Joshua Harlow 2016-06-01 15:15:40 -07:00
parent c327f858e6
commit d901a7bd61
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ def _html_page_context(app, pagename, templatename, context, doctree):
raw_version_list = ''
# grab last five that start with a number and reverse the order
if six.PY3:
raw_version_list = raw_version_list.decode("utf8")
other_versions = [t for t in raw_version_list.split('\n')
if t and t[0] in string.digits][:-6:-1]
context['other_versions'] = other_versions