]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
cast curl debug messages to str 2106/head
authorMin RK <benjaminrk@gmail.com>
Tue, 11 Jul 2017 10:07:34 +0000 (12:07 +0200)
committerMin RK <benjaminrk@gmail.com>
Tue, 11 Jul 2017 10:07:34 +0000 (12:07 +0200)
since they come in as bytes on Python 3

tornado/curl_httpclient.py

index 77c9537cbbe38f12820edd0768d304012b5ba27e..9a0402b5f6da404e22120dbaf0c7d5bde5bc0b81 100644 (file)
@@ -499,6 +499,7 @@ class CurlAsyncHTTPClient(AsyncHTTPClient):
 
     def _curl_debug(self, debug_type, debug_msg):
         debug_types = ('I', '<', '>', '<', '>')
+        debug_msg = native_str(debug_msg)
         if debug_type == 0:
             curl_log.debug('%s', debug_msg.strip())
         elif debug_type in (1, 2):