Make landmines.py Python 3-compatible
universal_newlines=True makes communicate() return a string instead of bytes. This is necessary to match the type of the return value of readlines() in clobber_if_necessary so that we don't think the lines are different when they are actually the same. R=thakis@chromium.org Bug: 941669 Change-Id: Ideb56385cdf5c3036e6858922fa3a7275e3b1be9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744689 Auto-Submit: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#685317} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 9bfd95fbb8f272a1f4625c9a5c58fa6adb3513d2
This commit is contained in:
Родитель
bad4b174aa
Коммит
d1c3dbd96d
|
@ -133,7 +133,8 @@ def main():
|
|||
|
||||
landmines = []
|
||||
for s in options.landmine_scripts:
|
||||
proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE)
|
||||
proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
output, _ = proc.communicate()
|
||||
landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
|
||||
clobber_if_necessary(landmines, options.src_dir)
|
||||
|
|
Загрузка…
Ссылка в новой задаче