Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Mar 19, 2024
1 parent bdfb09b commit b289825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robotframework_reportportal/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
})


def unescape(binary_string: str, stop_at: int = -1):
def _unescape(binary_string: str, stop_at: int = -1):
result = bytearray()
join_list = list()
join_idx = -3
Expand Down Expand Up @@ -161,7 +161,7 @@ def log_message(self, message: Dict) -> None:
+ str(msg_content.encode('utf-8'))[:-5] + TRUNCATION_SIGN)
else:
# Do not log full binary data, since it's usually corrupted
content_type = guess_content_type_from_bytes(unescape(msg.message, 128))
content_type = guess_content_type_from_bytes(_unescape(msg.message, 128))
msg.message = (f'Binary data of type "{content_type}" logging skipped, as it was processed as text and'
' hence corrupted.')
msg.level = 'WARN'
Expand Down

0 comments on commit b289825

Please sign in to comment.