summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2022-08-21 14:18:53 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2022-08-21 14:18:53 +0200
commit1caada197ab92cfcd53b8dff8982be235f129047 (patch)
treef217acf7c3c8eeee67d3e8b706a2e8ad4db6ed1b
parent1f47acaec13f30832fcfb56fc45843e90ad27673 (diff)
downloadslixmpp-1caada197ab92cfcd53b8dff8982be235f129047.tar.gz
slixmpp-1caada197ab92cfcd53b8dff8982be235f129047.tar.bz2
slixmpp-1caada197ab92cfcd53b8dff8982be235f129047.tar.xz
slixmpp-1caada197ab92cfcd53b8dff8982be235f129047.zip
JID: Make node and resource setters accept None
This is the proper way to unset these.
-rw-r--r--slixmpp/jid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py
index d02f98a3..c705a422 100644
--- a/slixmpp/jid.py
+++ b/slixmpp/jid.py
@@ -368,7 +368,7 @@ class JID:
return self._node
@node.setter
- def node(self, value: str):
+ def node(self, value: Optional[str]):
self._node = _validate_node(value)
self._update_bare_full()
@@ -386,7 +386,7 @@ class JID:
return self._resource
@resource.setter
- def resource(self, value: str):
+ def resource(self, value: Optional[str]):
self._resource = _validate_resource(value)
self._update_bare_full()