summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030/stanza
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-02-25 09:53:35 -0800
committerLance Stout <lancestout@gmail.com>2013-02-25 09:53:35 -0800
commit82bbe5d1a67613d5e1a23bec4260b9e6644d339b (patch)
tree2d7a61c4f64afc7485e5a6ae71b0fe972ab8d1e4 /sleekxmpp/plugins/xep_0030/stanza
parent9a45ebd98bb03120f1eca3945eaa8777abe8ece0 (diff)
parenta1d71d31e85df2cf6efc835c30592126ca9861f2 (diff)
downloadslixmpp-82bbe5d1a67613d5e1a23bec4260b9e6644d339b.tar.gz
slixmpp-82bbe5d1a67613d5e1a23bec4260b9e6644d339b.tar.bz2
slixmpp-82bbe5d1a67613d5e1a23bec4260b9e6644d339b.tar.xz
slixmpp-82bbe5d1a67613d5e1a23bec4260b9e6644d339b.zip
Merge branch 'develop'
Diffstat (limited to 'sleekxmpp/plugins/xep_0030/stanza')
-rw-r--r--sleekxmpp/plugins/xep_0030/stanza/items.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0030/stanza/items.py b/sleekxmpp/plugins/xep_0030/stanza/items.py
index 512f2336..10458614 100644
--- a/sleekxmpp/plugins/xep_0030/stanza/items.py
+++ b/sleekxmpp/plugins/xep_0030/stanza/items.py
@@ -128,9 +128,10 @@ class DiscoItems(ElementBase):
def del_items(self):
"""Remove all items."""
self._items = set()
- for item in self['substanzas']:
- if isinstance(item, DiscoItem):
- self.xml.remove(item.xml)
+ items = [i for i in self.iterables if isinstance(i, DiscoItem)]
+ for item in items:
+ self.xml.remove(item.xml)
+ self.iterables.remove(item)
class DiscoItem(ElementBase):