]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix type check that pep8 complains about.
authorBen Darnell <ben@bendarnell.com>
Mon, 4 Mar 2013 03:54:38 +0000 (22:54 -0500)
committerBen Darnell <ben@bendarnell.com>
Mon, 4 Mar 2013 03:54:38 +0000 (22:54 -0500)
tornado/curl_httpclient.py

index f46ea7b870afeac3a69ad42a435c1228da290a49..721e46c33d584a4e537c186c39afc54cd7756423 100644 (file)
@@ -31,6 +31,7 @@ from tornado import stack_context
 
 from tornado.escape import utf8, native_str
 from tornado.httpclient import HTTPRequest, HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
+from tornado.util import bytes_type
 
 try:
     from io import BytesIO  # py3
@@ -319,7 +320,7 @@ def _curl_setup_request(curl, request, buffer, headers):
         write_function = request.streaming_callback
     else:
         write_function = buffer.write
-    if type(b'') is type(''):  # py2
+    if bytes_type is str:  # py2
         curl.setopt(pycurl.WRITEFUNCTION, write_function)
     else:  # py3
         # Upstream pycurl doesn't support py3, but ubuntu 12.10 includes