mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 00:00:44 +02:00
Make request logs pretty in Python 3 (#5992)
Decode response data as UTF-8 to eliminate ugly bytes repr in Python 3. Resolves #5932
This commit is contained in:
committed by
Brad Warren
parent
02b128a128
commit
99d94cc7e8
+1
-1
@@ -1030,7 +1030,7 @@ class ClientNetwork(object): # pylint: disable=too-many-instance-attributes
|
||||
if response.headers.get("Content-Type") == DER_CONTENT_TYPE:
|
||||
debug_content = base64.b64encode(response.content)
|
||||
else:
|
||||
debug_content = response.content
|
||||
debug_content = response.content.decode("utf-8")
|
||||
logger.debug('Received response:\nHTTP %d\n%s\n\n%s',
|
||||
response.status_code,
|
||||
"\n".join(["{0}: {1}".format(k, v)
|
||||
|
||||
Reference in New Issue
Block a user