From 6dbfeaf1649022731c305d9d06ca9ce7f9e034b2 Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sun, 3 Feb 2013 13:21:52 +0000 Subject: [PATCH] Make fetch_svn_revision work properly with python 3 git-svn-id: svn://localhost/ardour2/branches/3.0@14046 d708f5d6-7413-0410-9779-e7cbd77b26cf --- wscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index f7ba5dfb6a..7a3aff8a9a 100644 --- a/wscript +++ b/wscript @@ -59,7 +59,8 @@ else: def fetch_svn_revision (path): cmd = "svnversion | cut -d: -f1" - return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].rstrip(os.linesep) + output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding) + return output.rstrip(os.linesep) def fetch_gcc_version (CC): cmd = "LANG= %s --version" % CC @@ -112,7 +113,7 @@ def create_stored_revision(): try: text = '#include "ardour/svn_revision.h"\n' text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev - print('Writing svn revision info to libs/ardour/svn_revision.cc using ', rev) + print('Writing svn revision info to libs/ardour/svn_revision.cc using ' + rev) o = open('libs/ardour/svn_revision.cc', 'w') o.write(text) o.close()