From 602a6d8491171de5cccb332684813e71f5d33c43 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Thu, 22 Apr 2010 21:24:28 -0700 Subject: bugfixes and continuing to work on pubsub tests --- sleekxmpp/plugins/stanza_pubsub.py | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'sleekxmpp/plugins') diff --git a/sleekxmpp/plugins/stanza_pubsub.py b/sleekxmpp/plugins/stanza_pubsub.py index 6ed84f1e..4187d49c 100644 --- a/sleekxmpp/plugins/stanza_pubsub.py +++ b/sleekxmpp/plugins/stanza_pubsub.py @@ -81,39 +81,6 @@ class Subscriptions(ElementBase): plugin_tag_map = {} subitem = (Subscription,) - def __init__(self, *args, **kwargs): - ElementBase.__init__(self, *args, **kwargs) - self.subscriptions = [] - self.idx = 0 - - def __iter__(self): - self.idx = 0 - return self - - def __next__(self): - self.idx += 1 - if self.idx + 1 > len(self.subscriptions): - self.idx = 0 - raise StopIteration - return self.subscriptions[self.idx] - - def __len__(self): - return len(self.subscriptions) - - def append(self, subscription): - if not isinstance(subscription, Subscription): - raise TypeError - self.xml.append(subscription.xml) - return self.subscriptions.append(subscription) - - def pop(self, idx=0): - aff = self.subscriptions.pop(idx) - self.xml.remove(aff.xml) - return aff - - def find(self, subscription): - return self.subscriptions.find(subscription) - stanzaPlugin(Pubsub, Subscriptions) class OptionalSetting(object): -- cgit v1.2.3