提交 326abfbe authored 作者: abalkin's avatar abalkin 提交者: Alexander Belopolsky

Fixed a bug introduced in previous commit. NB: install before testing under py3k.

上级 a02bc80d
......@@ -13,6 +13,7 @@ import subprocess
import sys
import tempfile
import time
import itertools
import distutils.sysconfig
......@@ -1547,7 +1548,7 @@ class GCC_compiler(object):
stderr = decode_iter(p.stderr.readlines())
lines = []
if parse:
for line in stdout + stderr:
for line in itertools.chain(stdout, stderr):
if "COLLECT_GCC_OPTIONS=" in line:
continue
elif "-march=" in line and "-march=native" not in line:
......@@ -1556,11 +1557,8 @@ class GCC_compiler(object):
lines.append(line.strip())
lines = list(set(lines)) # to remove duplicate
else:
lines = stdout + stderr
if PY3:
return [line.decode() for line in lines]
else:
return lines
lines = itertools.chain(stdout, stderr)
return list(lines)
# The '-' at the end is needed. Otherwise, g++ do not output
# enough information.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论