servo: Merge #13889 - Use str for bindgen output directly (from upsuper:regen-output); r=emilio
authorXidorn Quan <me@upsuper.org>
Sun, 23 Oct 2016 18:10:03 -0500
changeset 339977 d0ddea7af17411e84f8b9a44ed449adc787b7aee
parent 339976 aa57bae4715bbf35f51b6e2a64126a1db711e19d
child 339978 6bc685a3f0340c866f34d943f5696e24c6612b6e
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
servo: Merge #13889 - Use str for bindgen output directly (from upsuper:regen-output); r=emilio r? @emilio Source-Repo: https://github.com/servo/servo Source-Revision: 672545430f187c37e62d8b9e7a99e1ba8ba5a3ed
servo/components/style/binding_tools/regen.py
--- a/servo/components/style/binding_tools/regen.py
+++ b/servo/components/style/binding_tools/regen.py
@@ -612,20 +612,20 @@ Option<&'a {0}>;".format(ty))
         print(flags)
 
     output = ""
     try:
         if debug:
             flags = [debugger, "--args"] + flags
             subprocess.check_call(flags)
         else:
-            output = subprocess.check_output(flags, stderr=subprocess.STDOUT)
-            output = output.decode('utf8')
+            output = subprocess.check_output(flags, stderr=subprocess.STDOUT,
+                                             universal_newlines=True)
     except subprocess.CalledProcessError as e:
-        print("FAIL\n", e.output.decode('utf8'))
+        print("FAIL\n", e.output)
         return 1
 
     print("OK")
     print("(please test with ./mach test-stylo)")
 
     if verbose:
         print(output)