Commit cf3f36ac authored by mathieui's avatar mathieui

Set unset part of a JID to empty string instead of None

it breaks assumptions on the type of the value
parent b88d2ecd
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment