From: Ben Darnell Date: Mon, 4 Mar 2013 03:54:38 +0000 (-0500) Subject: Fix type check that pep8 complains about. X-Git-Tag: v3.0.0~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9364e5e1c32734ebe32cbd940d26903e13165422;p=thirdparty%2Ftornado.git Fix type check that pep8 complains about. --- diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index f46ea7b87..721e46c33 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -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