[build]: Build on Arch Linux with python 2.7-3.8
This change allow builds to succeed on Arch Linux with python 2.7, 3.7.4
and 3.8. Otherwise it fails with python 3.7.4 and 3.8.
- Add `universal_newlines=True` so subprocess stdout is opened in text mode.
Test: No added tests as there are no behavioral changes.
Change-Id: I0e156fe42a4fe13b14cdd4b97e8c081a727cf9b2
diff --git a/scripts/gn_script_wrapper.py b/scripts/gn_script_wrapper.py
index cb49150..74fb0cb 100755
--- a/scripts/gn_script_wrapper.py
+++ b/scripts/gn_script_wrapper.py
@@ -7,6 +7,6 @@
if __name__ == '__main__':
f = open(sys.argv[2], 'w')
exec_string = "PYTHONPATH=" + sys.argv[1] + " python " + " ".join(sys.argv[3:])
- child = subprocess.Popen(exec_string, shell=True, stdout=subprocess.PIPE)
+ child = subprocess.Popen(exec_string, shell=True, universal_newlines=True, stdout=subprocess.PIPE)
f.write(child.stdout.read())
- exit(child.returncode)
\ No newline at end of file
+ exit(child.returncode)