From cf3f36ac5230925dd146cdec9e1a790596aacc58 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 4 Oct 2016 19:42:05 +0200 Subject: Set unset part of a JID to empty string instead of None it breaks assumptions on the type of the value --- slixmpp/jid.py | 4 ++-- 1 file 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) -- cgit v1.2.3