From 212660091f155255ee9f45cdfca7969d8313309c Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Mon, 19 Apr 2010 01:03:27 -0700 Subject: added pubsub tests and fixed match on iterator error --- sleekxmpp/plugins/stanza_pubsub.py | 2 +- sleekxmpp/xmlstream/stanzabase.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'sleekxmpp') diff --git a/sleekxmpp/plugins/stanza_pubsub.py b/sleekxmpp/plugins/stanza_pubsub.py index 1d8c86f2..d25c2b3a 100644 --- a/sleekxmpp/plugins/stanza_pubsub.py +++ b/sleekxmpp/plugins/stanza_pubsub.py @@ -2,6 +2,7 @@ from .. xmlstream.stanzabase import ElementBase, ET, JID from .. stanza.iq import Iq from .. basexmpp import basexmpp from .. xmlstream.xmlstream import XMLStream +import logging from . import xep_0004 def stanzaPlugin(stanza, plugin): @@ -283,7 +284,6 @@ class Configure(ElementBase): self.xml.remove(config) stanzaPlugin(Pubsub, Configure) -stanzaPlugin(Create, Configure) class DefaultConfig(ElementBase): namespace = 'http://jabber.org/protocol/pubsub#owner' diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 6ed5cbd0..f72aa6e2 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -120,6 +120,8 @@ class ElementBase(tostring.ToString): if tagargs[0] not in (self.plugins, self.plugin_attrib): return False founditerable = False for iterable in self.iterables: + if nodes[1:] == []: + break founditerable = iterable.match(nodes[1:]) if founditerable: break; for evals in tagargs[1:]: -- cgit v1.2.3