diff options
author | mathieui <mathieui@mathieui.net> | 2016-10-04 19:42:05 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2016-10-04 19:42:05 +0200 |
commit | cf3f36ac5230925dd146cdec9e1a790596aacc58 (patch) | |
tree | 5670c9f98810843c982111cf70cc04a5bc1554f1 | |
parent | b88d2ecd77c7a4889aff632365fc20c9750db3f5 (diff) | |
download | slixmpp-cf3f36ac5230925dd146cdec9e1a790596aacc58.tar.gz slixmpp-cf3f36ac5230925dd146cdec9e1a790596aacc58.tar.bz2 slixmpp-cf3f36ac5230925dd146cdec9e1a790596aacc58.tar.xz slixmpp-cf3f36ac5230925dd146cdec9e1a790596aacc58.zip |
Set unset part of a JID to empty string instead of None
it breaks assumptions on the type of the value
-rw-r--r-- | slixmpp/jid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py index 4141b05a..9cb815db 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -79,7 +79,7 @@ def _validate_node(node): :returns: The local portion of a JID, as validated by nodeprep. """ if node is None: - return None + return '' try: node = nodeprep(node) @@ -160,7 +160,7 @@ def _validate_resource(resource): :returns: The local portion of a JID, as validated by resourceprep. """ if resource is None: - return None + return '' try: resource = resourceprep(resource) |