aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-10-10 13:08:14 +0000
committerlloyd <[email protected]>2011-10-10 13:08:14 +0000
commita5be7c394624db7a08a06467aa14ebff9a1dcb3d (patch)
tree6914cacbb285838ca7218604ef10ab495f53f5e2 /configure.py
parentca5581260445e70ed4d038091acb88949b6101ce (diff)
Python 3.1's subprocess.Popen.communicate returns a bytes rather than
a str. Sigh.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 8ad910cb6..d6c632a1a 100755
--- a/configure.py
+++ b/configure.py
@@ -1735,10 +1735,13 @@ def main(argv = None):
def get_gcc_version(gcc_bin):
try:
- gcc_version = ''.join(subprocess.Popen(
+ subproc_result = subprocess.Popen(
gcc_bin.split(' ') + ['-dumpversion'],
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()).strip()
+ stderr=subprocess.PIPE).communicate()
+
+ gcc_version = ''.join(map(str, subproc_result)).strip()
+
logging.info('Detected gcc version %s' % (gcc_version))
return gcc_version
except OSError: