]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
cast curl debug messages to str
authorMin RK <benjaminrk@gmail.com>
Tue, 11 Jul 2017 10:07:34 +0000 (12:07 +0200)
committerBen Darnell <ben@bendarnell.com>
Fri, 5 Jan 2018 03:11:08 +0000 (22:11 -0500)
since they come in as bytes on Python 3

tornado/curl_httpclient.py

index eef4a17a6b4a7e6e30c2db0ab5b1f44c2791ebea..8558d65c953813ea292f0e9ba6ca593d9c7f6665 100644 (file)
@@ -493,6 +493,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):