From d901a7bd61db6a60e909978ffa9cd0e340519cfc Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Wed, 1 Jun 2016 15:15:40 -0700 Subject: 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 --- oslosphinx/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oslosphinx/__init__.py b/oslosphinx/__init__.py index 4613c89..8afd029 100644 --- a/oslosphinx/__init__.py +++ b/oslosphinx/__init__.py @@ -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 -- cgit v1.2.1