mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-08 21:06:43 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
class AiohttpTracer:
|
class AiohttpTracer:
|
||||||
def __init__(self, logger):
|
def __init__(self, logger):
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
@@ -17,9 +15,11 @@ class AiohttpTracer:
|
|||||||
chunk_size = len(params.chunk)
|
chunk_size = len(params.chunk)
|
||||||
try:
|
try:
|
||||||
# Try to decode as text
|
# Try to decode as text
|
||||||
text = params.chunk.decode('utf-8')
|
text = params.chunk.decode("utf-8")
|
||||||
self.logger.debug(f"Response chunk ({id(context):#x}) {chunk_size} bytes: {text}")
|
self.logger.debug(f"Response chunk ({id(context):#x}) {chunk_size} bytes: {text}")
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
# If not valid UTF-8, show as hex
|
# If not valid UTF-8, show as hex
|
||||||
hex_data = params.chunk.hex()
|
hex_data = params.chunk.hex()
|
||||||
self.logger.debug(f"Response chunk ({id(context):#x}) ({chunk_size} bytes) [HEX]: {hex_data}")
|
self.logger.debug(
|
||||||
|
f"Response chunk ({id(context):#x}) ({chunk_size} bytes) [HEX]: {hex_data}"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user