Thrift Python 3 support.

This commit is contained in:
Dmitry Trofimov
2015-04-30 12:29:39 +02:00
parent 51e168ed04
commit 60828ddbad
17 changed files with 871 additions and 29 deletions
+4
View File
@@ -5,6 +5,7 @@ import pstats
from _prof_imports import TSerialization
from _prof_imports import TJSONProtocol
from _prof_imports import ProfilerResponse, Stats, FuncStat, Function
from _prof_imports import IS_PY3K
if __name__ == '__main__':
@@ -52,6 +53,9 @@ if __name__ == '__main__':
data = TSerialization.serialize(m, TJSONProtocol.TJSONProtocolFactory())
if IS_PY3K:
data = data.decode("utf-8")
sys.stdout.write(data)
sys.stdout.flush()