diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-08-20 00:23:21 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-08-20 00:23:21 +0100 |
commit | 7c3b3827b4c1b717d7d1ea2d4e88cdbe228730de (patch) | |
tree | df1ddb69d9dbf6075ebf0439b07b2050622b275e | |
parent | 9f6fa6513946e78de6e77a7e924fedc84c89ad25 (diff) | |
download | slixmpp-7c3b3827b4c1b717d7d1ea2d4e88cdbe228730de.tar.gz slixmpp-7c3b3827b4c1b717d7d1ea2d4e88cdbe228730de.tar.bz2 slixmpp-7c3b3827b4c1b717d7d1ea2d4e88cdbe228730de.tar.xz slixmpp-7c3b3827b4c1b717d7d1ea2d4e88cdbe228730de.zip |
jid: Make property aliases proper aliases.
-rw-r--r-- | slixmpp/jid.py | 61 |
1 files changed, 8 insertions, 53 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py index 9cb815db..dd6c1047 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -347,30 +347,10 @@ class JID: return self._node @property - def user(self): - return self._node - - @property - def local(self): - return self._node - - @property - def username(self): - return self._node - - @property def domain(self): return self._domain @property - def server(self): - return self._domain - - @property - def host(self): - return self._domain - - @property def resource(self): return self._resource @@ -382,45 +362,16 @@ class JID: def full(self): return self._full - @property - def jid(self): - return self._full - @node.setter def node(self, value): self._node = _validate_node(value) self._update_bare_full() - @user.setter - def user(self, value): - self._node = _validate_node(value) - self._update_bare_full() - - @local.setter - def local(self, value): - self._node = _validate_node(value) - self._update_bare_full() - - @username.setter - def username(self, value): - self._node = _validate_node(value) - self._update_bare_full() - @domain.setter def domain(self, value): self._domain = _validate_domain(value) self._update_bare_full() - @server.setter - def server(self, value): - self._domain = _validate_domain(value) - self._update_bare_full() - - @host.setter - def host(self, value): - self._domain = _validate_domain(value) - self._update_bare_full() - @bare.setter def bare(self, value): node, domain, resource = _parse_jid(value) @@ -439,10 +390,14 @@ class JID: self._node, self._domain, self._resource = _parse_jid(value) self._update_bare_full() - @jid.setter - def jid(self, value): - self._node, self._domain, self._resource = _parse_jid(value) - self._update_bare_full() + user = node + local = node + username = node + + server = domain + host = domain + + jid = full def __str__(self): """Use the full JID as the string value.""" |