Skip to content

Commit

Permalink
Only call native_str on curl_debug message in tornado when needed
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Darnell <[email protected]>
  • Loading branch information
vzhestkov and bdarnell committed Aug 23, 2023
1 parent 5ea4add commit 5410141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/ext/tornado/curl_httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,11 @@ def _curl_header_callback(self, headers, header_callback, header_line):

def _curl_debug(self, debug_type, debug_msg):
debug_types = ('I', '<', '>', '<', '>')
debug_msg = native_str(debug_msg)
if debug_type == 0:
debug_msg = native_str(debug_msg)
curl_log.debug('%s', debug_msg.strip())
elif debug_type in (1, 2):
debug_msg = native_str(debug_msg)
for line in debug_msg.splitlines():
curl_log.debug('%s %s', debug_types[debug_type], line)
elif debug_type == 4:
Expand Down

0 comments on commit 5410141

Please sign in to comment.