diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-19 19:57:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-19 20:00:46 +0400 |
commit | 2dce13d213f6c02b97a62bb1d7a8661998e22a53 (patch) | |
tree | fcefb9bedaba95b33ac53780de7b0501342c71d6 /SConstruct | |
parent | eaac6cbcd9428533273091710759106131f92340 (diff) |
Python: Remove deprecated uses of os.popen
T40415 by Lawrence D'Oliveiro
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 251f7eae92e..f27ba1754c1 100644 --- a/SConstruct +++ b/SConstruct @@ -285,8 +285,7 @@ if env['OURPLATFORM']=='darwin': import subprocess command = ["%s"%env['CC'], "--version"] - process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=False) - line = process.communicate()[0] + line = subprocess.check_output(command) ver = re.search(r'[0-9]+(\.[0-9]+[svn]+)+', line) or re.search(r'[0-9]+(\.[0-9]+)+', line) # read the "based on LLVM x.xsvn" version here, not the Apple version if ver: env['CCVERSION'] = ver.group(0).strip('svn') |