| Index: build/check_gn_headers.py
|
| diff --git a/build/check_gn_headers.py b/build/check_gn_headers.py
|
| index 3e04120dd94ec13b084b0a87e1cadf817cac0487..ae1ef49c179abd1faa254180d859042beebe773d 100755
|
| --- a/build/check_gn_headers.py
|
| +++ b/build/check_gn_headers.py
|
| @@ -19,21 +19,7 @@
|
|
|
| def GetHeadersFromNinja(out_dir):
|
| """Return all the header files from ninja_deps"""
|
| -
|
| - def NinjaSource():
|
| - cmd = ['ninja', '-C', out_dir, '-t', 'deps']
|
| - # A negative bufsize means to use the system default, which usually
|
| - # means fully buffered.
|
| - popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=-1)
|
| - for line in iter(popen.stdout.readline, ''):
|
| - yield line
|
| -
|
| - popen.stdout.close()
|
| - return_code = popen.wait()
|
| - if return_code:
|
| - raise subprocess.CalledProcessError(return_code, cmd)
|
| -
|
| - ninja_out = NinjaSource()
|
| + ninja_out = subprocess.check_output(['ninja', '-C', out_dir, '-t', 'deps'])
|
| return ParseNinjaDepsOutput(ninja_out)
|
|
|
|
|
| @@ -44,7 +30,7 @@
|
| prefix = '..' + os.sep + '..' + os.sep
|
|
|
| is_valid = False
|
| - for line in ninja_out:
|
| + for line in ninja_out.split('\n'):
|
| if line.startswith(' '):
|
| if not is_valid:
|
| continue
|
|
|