[PATCH 2/4] fix python3 compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Fix query of git commit tag to work with python3. The existing code
falls over when using Sphinx on Python 3 due to the string datatype
changes. Fix the code to be more robust.

Signed-off-by: Grant Likely <grant.likely@xxxxxxx>
---
 source/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/conf.py b/source/conf.py
index c6cddb9..c84edc3 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -66,7 +66,7 @@ author = u'devicetree.org'
 #
 # The short X.Y version.
 try:
-    version = subprocess.check_output(["git", "describe", "--dirty"]).strip().encode()
+    version = str(subprocess.check_output(["git", "describe", "--dirty"]), 'utf-8').strip()
 except:
     version = "unknown-rev"
 # The full version, including alpha/beta/rc tags.
-- 
2.20.1




[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux