##// END OF EJS Templates
py3: encode JSON str to bytes...
Gregory Szorc -
r40190:fe11fc7e default
parent child Browse files
Show More
@@ -11,6 +11,7 b' import os'
11 import sys
11 import sys
12
12
13 from mercurial import (
13 from mercurial import (
14 pycompat,
14 util,
15 util,
15 )
16 )
16
17
@@ -90,7 +91,7 b' def request(host, path, show):'
90 data = json.loads(data)
91 data = json.loads(data)
91 lines = json.dumps(data, sort_keys=True, indent=2).splitlines()
92 lines = json.dumps(data, sort_keys=True, indent=2).splitlines()
92 for line in lines:
93 for line in lines:
93 bodyfh.write(line.rstrip())
94 bodyfh.write(pycompat.sysbytes(line.rstrip()))
94 bodyfh.write(b'\n')
95 bodyfh.write(b'\n')
95 else:
96 else:
96 bodyfh.write(data)
97 bodyfh.write(data)
General Comments 0
You need to be logged in to leave comments. Login now