diff options
Diffstat (limited to 'sleekxmpp/thirdparty')
-rw-r--r-- | sleekxmpp/thirdparty/suelta/util.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/thirdparty/suelta/util.py b/sleekxmpp/thirdparty/suelta/util.py index 7d822a81..cd2439d5 100644 --- a/sleekxmpp/thirdparty/suelta/util.py +++ b/sleekxmpp/thirdparty/suelta/util.py @@ -15,6 +15,9 @@ def bytes(text): :param text: Unicode text to convert to bytes :rtype: bytes (Python3), str (Python2.6+) """ + if text is None: + return b'' + if sys.version_info < (3, 0): import __builtin__ return __builtin__.bytes(text) |