tests/get-with-headers.py
changeset 40154 fe11fc7e541f
parent 36576 cfd0c1df5e33
child 43076 2372284d9457
--- a/tests/get-with-headers.py	Thu Oct 11 21:05:03 2018 +0200
+++ b/tests/get-with-headers.py	Thu Oct 11 21:18:58 2018 +0200
@@ -11,6 +11,7 @@
 import sys
 
 from mercurial import (
+    pycompat,
     util,
 )
 
@@ -90,7 +91,7 @@
             data = json.loads(data)
             lines = json.dumps(data, sort_keys=True, indent=2).splitlines()
             for line in lines:
-                bodyfh.write(line.rstrip())
+                bodyfh.write(pycompat.sysbytes(line.rstrip()))
                 bodyfh.write(b'\n')
         else:
             bodyfh.write(data)