summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/stream_error.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-19 21:50:33 -0700
committerLance Stout <lancestout@gmail.com>2012-06-19 21:50:33 -0700
commit5820d49cd401a1362a8a675c4b91935adb1240fe (patch)
treef40f78839ae3004bfb0b8da1ae93d61759d8ad66 /sleekxmpp/stanza/stream_error.py
parent1ab66e576786ecb0cfb9b6b163811735564b951b (diff)
parent36c11ad9de7c1b5a199aa5a4302e33085513c126 (diff)
downloadslixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.gz
slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.bz2
slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.xz
slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.zip
Merge branch 'master' into develop
Conflicts: sleekxmpp/basexmpp.py
Diffstat (limited to 'sleekxmpp/stanza/stream_error.py')
-rw-r--r--sleekxmpp/stanza/stream_error.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/stream_error.py b/sleekxmpp/stanza/stream_error.py
index 5a6dac96..ed0078c9 100644
--- a/sleekxmpp/stanza/stream_error.py
+++ b/sleekxmpp/stanza/stream_error.py
@@ -54,7 +54,7 @@ class StreamError(Error, StanzaBase):
"""
namespace = 'http://etherx.jabber.org/streams'
- interfaces = set(('condition', 'text'))
+ interfaces = set(('condition', 'text', 'see_other_host'))
conditions = set((
'bad-format', 'bad-namespace-prefix', 'conflict',
'connection-timeout', 'host-gone', 'host-unknown',
@@ -66,3 +66,18 @@ class StreamError(Error, StanzaBase):
'unsupported-feature', 'unsupported-stanza-type',
'unsupported-version'))
condition_ns = 'urn:ietf:params:xml:ns:xmpp-streams'
+
+ def get_see_other_host(self):
+ ns = self.condition_ns
+ return self._get_sub_text('{%s}see-other-host' % ns, '')
+
+ def set_see_other_host(self, value):
+ if value:
+ del self['condition']
+ ns = self.condition_ns
+ return self._set_sub_text('{%s}see-other-host' % ns, value)
+ elif self['condition'] == 'see-other-host':
+ del self['condition']
+
+ def del_see_other_host(self):
+ self._del_sub('{%s}see-other-host' % self.condition_ns)