summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/error.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-04 11:52:17 -0700
committerLance Stout <lancestout@gmail.com>2011-08-04 11:52:17 -0700
commit89cffd43f48cfc835b70e137776eb8c2e73a0b67 (patch)
tree088035aeb688edc6a0f5675de31eedf169f87fd3 /sleekxmpp/stanza/error.py
parentad978700fc891602c826dea03615c396f39364a0 (diff)
parentb9764cc120c48576be1fe6cadb11813d12f91f4c (diff)
downloadslixmpp-89cffd43f48cfc835b70e137776eb8c2e73a0b67.tar.gz
slixmpp-89cffd43f48cfc835b70e137776eb8c2e73a0b67.tar.bz2
slixmpp-89cffd43f48cfc835b70e137776eb8c2e73a0b67.tar.xz
slixmpp-89cffd43f48cfc835b70e137776eb8c2e73a0b67.zip
Merge branch 'develop' into roster
Conflicts: setup.py
Diffstat (limited to 'sleekxmpp/stanza/error.py')
-rw-r--r--sleekxmpp/stanza/error.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/error.py b/sleekxmpp/stanza/error.py
index 5d1ce50d..93231a48 100644
--- a/sleekxmpp/stanza/error.py
+++ b/sleekxmpp/stanza/error.py
@@ -88,7 +88,9 @@ class Error(ElementBase):
"""Return the condition element's name."""
for child in self.xml.getchildren():
if "{%s}" % self.condition_ns in child.tag:
- return child.tag.split('}', 1)[-1]
+ cond = child.tag.split('}', 1)[-1]
+ if cond in self.conditions:
+ return cond
return ''
def set_condition(self, value):