summaryrefslogtreecommitdiff
path: root/tools/gyp/pylib/gyp/mac_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gyp/pylib/gyp/mac_tool.py')
-rwxr-xr-xtools/gyp/pylib/gyp/mac_tool.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/gyp/pylib/gyp/mac_tool.py b/tools/gyp/pylib/gyp/mac_tool.py
index b0363cc393..0ad7e7a1b6 100755
--- a/tools/gyp/pylib/gyp/mac_tool.py
+++ b/tools/gyp/pylib/gyp/mac_tool.py
@@ -105,17 +105,21 @@ class MacTool(object):
ibtool_section_re = re.compile(r'/\*.*\*/')
ibtool_re = re.compile(r'.*note:.*is clipping its content')
- ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
+ try:
+ stdout = subprocess.check_output(args)
+ except subprocess.CalledProcessError as e:
+ print(e.output)
+ raise
current_section_header = None
- for line in ibtoolout.stdout:
+ for line in stdout.splitlines():
if ibtool_section_re.match(line):
current_section_header = line
elif not ibtool_re.match(line):
if current_section_header:
- sys.stdout.write(current_section_header)
+ print(current_section_header)
current_section_header = None
- sys.stdout.write(line)
- return ibtoolout.returncode
+ print(line)
+ return 0
def _ConvertToBinary(self, dest):
subprocess.check_call([