From 2aef15dfa3e0ada2d17dae90be6ef645607d20ce Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Thu, 13 Mar 2014 10:04:36 -0400 Subject: [PATCH] Fix command-line tornado.httpclient on python 3. --- tornado/httpclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 9b42d401..bb11e113 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__":