summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/stream_error.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-19 16:21:34 -0700
committerLance Stout <lancestout@gmail.com>2012-06-19 16:21:34 -0700
commit019a4b20ae5284ec07d4ecc5e5136be5012e88bd (patch)
tree589e183ae20a96e5c0996023b6d227393bd4ee35 /sleekxmpp/stanza/stream_error.py
parent433ee08687e5a0df7e0d1388f194d246f5aaee05 (diff)
downloadslixmpp-019a4b20ae5284ec07d4ecc5e5136be5012e88bd.tar.gz
slixmpp-019a4b20ae5284ec07d4ecc5e5136be5012e88bd.tar.bz2
slixmpp-019a4b20ae5284ec07d4ecc5e5136be5012e88bd.tar.xz
slixmpp-019a4b20ae5284ec07d4ecc5e5136be5012e88bd.zip
Fix assigning values to error stanzas.
The new data interfaces were deleting the actual error conditions if they were set afterward with falsy data.
Diffstat (limited to 'sleekxmpp/stanza/stream_error.py')
-rw-r--r--sleekxmpp/stanza/stream_error.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/stream_error.py b/sleekxmpp/stanza/stream_error.py
index 8c541da4..ed0078c9 100644
--- a/sleekxmpp/stanza/stream_error.py
+++ b/sleekxmpp/stanza/stream_error.py
@@ -72,10 +72,12 @@ class StreamError(Error, StanzaBase):
return self._get_sub_text('{%s}see-other-host' % ns, '')
def set_see_other_host(self, value):
- del self['condition']
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)