From: Ben Darnell Date: Thu, 13 Mar 2014 14:04:36 +0000 (-0400) Subject: Fix command-line tornado.httpclient on python 3. X-Git-Tag: v4.0.0b1~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aef15dfa3e0ada2d17dae90be6ef645607d20ce;p=thirdparty%2Ftornado.git Fix command-line tornado.httpclient on python 3. --- diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 9b42d401a..bb11e1137 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -34,7 +34,7 @@ import time import weakref from tornado.concurrent import TracebackFuture -from tornado.escape import utf8 +from tornado.escape import utf8, native_str from tornado import httputil, stack_context from tornado.ioloop import IOLoop from tornado.util import Configurable @@ -556,7 +556,7 @@ def main(): if options.print_headers: print(response.headers) if options.print_body: - print(response.body) + print(native_str(response.body)) client.close() if __name__ == "__main__":