mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-18 03:00:18 +00:00
Fix ordering bug when retrieving an error condition.
This commit is contained in:
parent
219df582da
commit
540d749695
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ class Error(ElementBase):
|
||||||
"""Return the condition element's name."""
|
"""Return the condition element's name."""
|
||||||
for child in self.xml.getchildren():
|
for child in self.xml.getchildren():
|
||||||
if "{%s}" % self.condition_ns in child.tag:
|
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 ''
|
return ''
|
||||||
|
|
||||||
def set_condition(self, value):
|
def set_condition(self, value):
|
||||||
|
|
Loading…
Reference in a new issue