Added short-circuit that prevents checking if message is unicode, if Python version is 3.0 or higher. There is no unicode keyword in Python 3 since all strings are sequences of Unicode characters.
Discovered this when trying to pass a msg of type dict to send_message(self, client, msg). Results in NameError: name 'unicode' is not defined when using Python 3.6.1.
Added short-circuit that prevents checking if message is
unicode
, if Python version is 3.0 or higher. There is nounicode
keyword in Python 3 since all strings are sequences of Unicode characters.Discovered this when trying to pass a
msg
of typedict
tosend_message(self, client, msg)
. Results inNameError: name 'unicode' is not defined
when using Python 3.6.1.