Commit 1be16437 authored by Albertas Agejevas's avatar Albertas Agejevas

Make an error more explicit.

Used to be "TypeError: str object is not an iterator".
parent 320e4d78
......@@ -267,6 +267,8 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
message = messages[0]
if isinstance(message, six.binary_type):
size += self.__message_output(messages.pop(0), output)
elif isinstance(message, six.text_type):
assert False, "Got a unicode message: %s" % repr(message)
elif message is _close_marker:
del messages[:]
del output[:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment