Chromium Code Reviews| 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__': |