Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: build/config/mac/compile_ib_files.py

Issue 2947393002: compile_ib_files.py: Wait for subprocess.Popen() to finish. (Closed)
Patch Set: Removed brackets on every print usage for consistency. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/compile_ib_files.py
diff --git a/build/config/mac/compile_ib_files.py b/build/config/mac/compile_ib_files.py
index 4923d82984cefadb4d2c4e1c579b73a8175c416f..149780e2d56211b2c271c2074ac6f7ecbb31668f 100644
--- a/build/config/mac/compile_ib_files.py
+++ b/build/config/mac/compile_ib_files.py
@@ -40,17 +40,21 @@ def main():
ibtool_section_re = re.compile(r'/\*.*\*/')
ibtool_re = re.compile(r'.*note:.*is clipping its content')
- ibtoolout = subprocess.Popen(ibtool_args, stdout=subprocess.PIPE)
+ try:
+ stdout = subprocess.check_output(ibtool_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
sdefresne 2017/06/23 16:48:57 nit: can you either use "print(ccurent_section_hea
current_section_header = None
- sys.stdout.write(line)
- return ibtoolout.returncode
+ print line
+ return 0
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698