summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-10-04 19:42:05 +0200
committermathieui <mathieui@mathieui.net>2016-10-04 19:42:05 +0200
commitcf3f36ac5230925dd146cdec9e1a790596aacc58 (patch)
tree5670c9f98810843c982111cf70cc04a5bc1554f1
parentb88d2ecd77c7a4889aff632365fc20c9750db3f5 (diff)
downloadslixmpp-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.py4
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)