Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0020.py @ 660:69a8bfd266a5
core, plugins: fixed bad use of children instead of elements() for domish.Element instances.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 15 Oct 2013 19:28:34 +0200 |
parents | 84a6e83157c2 |
children | bfabeedbf32e |
comparison
equal
deleted
inserted
replaced
659:b6c22d9f593a | 660:69a8bfd266a5 |
---|---|
53 | 53 |
54 def getFeatureElt(self, elt): | 54 def getFeatureElt(self, elt): |
55 """Check element's children to find feature elements | 55 """Check element's children to find feature elements |
56 @param elt: domish.Element | 56 @param elt: domish.Element |
57 @return: feature elements""" | 57 @return: feature elements""" |
58 return filter(lambda elt: elt.name == 'feature', elt.elements()) | 58 return [child for child in elt.elements() if child.name == 'feature'] |
59 | 59 |
60 def getChoosedOptions(self, elt): | 60 def getChoosedOptions(self, elt): |
61 """Return choosed feature for feature element | 61 """Return choosed feature for feature element |
62 @param elt: feature domish element | 62 @param elt: feature domish element |
63 @return: dict with feature name as key, and choosed option as value""" | 63 @return: dict with feature name as key, and choosed option as value""" |