Fix command-line tornado.httpclient on python 3.

This commit is contained in:
Ben Darnell 2014-03-13 10:04:36 -04:00
parent 180e8186ca
commit 2aef15dfa3
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ import time
import weakref import weakref
from tornado.concurrent import TracebackFuture 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 import httputil, stack_context
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tornado.util import Configurable from tornado.util import Configurable
@ -556,7 +556,7 @@ def main():
if options.print_headers: if options.print_headers:
print(response.headers) print(response.headers)
if options.print_body: if options.print_body:
print(response.body) print(native_str(response.body))
client.close() client.close()
if __name__ == "__main__": if __name__ == "__main__":