Skip to content

Commit

Permalink
Renamed process() bytes argument to data to avoid collision with …
Browse files Browse the repository at this point in the history
…`bytes` built-in type
  • Loading branch information
Vasily Zakharov authored and auvipy committed Nov 4, 2024
1 parent cb60792 commit 5252cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ws4py/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def terminate(self):
self.stream = None
self.environ = None

def process(self, bytes):
def process(self, data):
""" Takes some bytes and process them through the
internal stream's parser. If a message of any kind is
found, performs one of these actions:
Expand All @@ -456,10 +456,10 @@ def process(self, bytes):
"""
s = self.stream

if not bytes and self.reading_buffer_size > 0:
if not data and self.reading_buffer_size > 0:
return False

self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE
self.reading_buffer_size = s.parser.send(data) or DEFAULT_READING_SIZE

if s.closing is not None:
logger.debug("Closing message received (%d): %s" % (s.closing.code, s.closing.reason.decode() if isinstance(s.closing.reason, bytes) else s.closing.reason))
Expand Down

0 comments on commit 5252cb9

Please sign in to comment.