diff options
author | Lance Stout <lancestout@gmail.com> | 2012-08-01 09:05:47 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-08-01 09:05:47 -0700 |
commit | fb4275648c1f809ea1eadb3fcd5e6ad1b244d5ab (patch) | |
tree | 12d5e7739150cbc41375e28a500c765e7fc12aeb /sleekxmpp/util | |
parent | 06a9d9fc3075df8e07960716c25d1eca2eb47f05 (diff) | |
parent | 475ccfa8dcc135934b7beef9826e67eb513bb828 (diff) | |
download | slixmpp-fb4275648c1f809ea1eadb3fcd5e6ad1b244d5ab.tar.gz slixmpp-fb4275648c1f809ea1eadb3fcd5e6ad1b244d5ab.tar.bz2 slixmpp-fb4275648c1f809ea1eadb3fcd5e6ad1b244d5ab.tar.xz slixmpp-fb4275648c1f809ea1eadb3fcd5e6ad1b244d5ab.zip |
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/util')
-rw-r--r-- | sleekxmpp/util/misc_ops.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/util/misc_ops.py b/sleekxmpp/util/misc_ops.py index 9ed535d9..1dcc2b91 100644 --- a/sleekxmpp/util/misc_ops.py +++ b/sleekxmpp/util/misc_ops.py @@ -19,6 +19,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) |