Commit 0f3759d9 authored by Stefan Behnel's avatar Stefan Behnel

Remove relict from Py2/3 migration.

parent fcabbe3d
......@@ -376,10 +376,9 @@ def get_cc_version(language):
env['LC_MESSAGES'] = 'C'
try:
p = subprocess.Popen([cc, "-v"], stderr=subprocess.PIPE, env=env)
except EnvironmentError:
# Be compatible with Python 3
except EnvironmentError as exc:
warnings.warn("Unable to find the %s compiler: %s: %s" %
(language, os.strerror(sys.exc_info()[1].errno), cc))
(language, os.strerror(exc.errno), cc))
return ''
_, output = p.communicate()
return output.decode(locale.getpreferredencoding() or 'ASCII', 'replace')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment