“stomp.py” is a Python client library for accessing messaging servers (such as ActiveMQ or RabbitMQ) using the STOMP protocol (versions 1.0, 1.1 and 1.2). It can also be run as a standalone, command-line client for testing.
I was trying this out and eventually found this bug - I get an AttributeError: 'bytes' object has no attribute 'encode'. I think this is because self.socket.recv() returns either bytes or str, so this PR just handles the case where a string is returned and encodes to bytes - it seems like that's how you wanted this function to behave.
Hi there!
I was trying this out and eventually found this bug - I get an
AttributeError: 'bytes' object has no attribute 'encode'
. I think this is becauseself.socket.recv()
returns either bytes or str, so this PR just handles the case where a string is returned and encodes to bytes - it seems like that's how you wanted this function to behave.Let me know if I've missed anything - thanks!