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): ...@@ -376,10 +376,9 @@ def get_cc_version(language):
env['LC_MESSAGES'] = 'C' env['LC_MESSAGES'] = 'C'
try: try:
p = subprocess.Popen([cc, "-v"], stderr=subprocess.PIPE, env=env) p = subprocess.Popen([cc, "-v"], stderr=subprocess.PIPE, env=env)
except EnvironmentError: except EnvironmentError as exc:
# Be compatible with Python 3
warnings.warn("Unable to find the %s compiler: %s: %s" % 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 '' return ''
_, output = p.communicate() _, output = p.communicate()
return output.decode(locale.getpreferredencoding() or 'ASCII', 'replace') 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