Skip to content

Closing message received – too many 's #276

Closed
@jolaf

Description

@jolaf

When debugging is enabled, sometimes the following message appears:

[D 230728 02:14:00 websocket:465] Closing message received (1005) 'b'''

Note too many 's in the message.
The reason for this is websocket.py line 465:

logger.debug("Closing message received (%d) '%s'" % (s.closing.code, s.closing.reason))

As s.closing.reason is a bytes object, it gets printed as b'' anyway, so extra 's around it seem unnecessary and either should be removed or s.closing.reason should be appended with .decode() to remove b'' formatting.

The same is true for line 474:

logger.debug("Error message received (%d) '%s'" % (error.code, error.reason))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions