##// END OF EJS Templates
py3: encode json output to bytes and use write()...
Gregory Szorc -
r40546:4b7eb862 default
parent child Browse files
Show More
@@ -763,7 +763,11 b' def write_to_json(data, fp):'
763
763
764 samples.append((sample.time, stack))
764 samples.append((sample.time, stack))
765
765
766 print(json.dumps(samples), file=fp)
766 data = json.dumps(samples)
767 if not isinstance(data, bytes):
768 data = data.encode('utf-8')
769
770 fp.write(data)
767
771
768 def write_to_chrome(data, fp, minthreshold=0.005, maxthreshold=0.999):
772 def write_to_chrome(data, fp, minthreshold=0.005, maxthreshold=0.999):
769 samples = []
773 samples = []
General Comments 0
You need to be logged in to leave comments. Login now