summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-09-01 14:20:34 -0400
committerLance Stout <lancestout@gmail.com>2010-09-01 14:20:34 -0400
commitaebd115ba2a8dfab7b345dfc121ec73b5dc7a5a1 (patch)
tree70f8b867a7a5a65f51a117bcf8ae9b5bc9dbd529 /sleekxmpp/xmlstream
parent3749c1b88c4774b85fcee1e26e8bce8dbeef23c7 (diff)
downloadslixmpp-aebd115ba2a8dfab7b345dfc121ec73b5dc7a5a1.tar.gz
slixmpp-aebd115ba2a8dfab7b345dfc121ec73b5dc7a5a1.tar.bz2
slixmpp-aebd115ba2a8dfab7b345dfc121ec73b5dc7a5a1.tar.xz
slixmpp-aebd115ba2a8dfab7b345dfc121ec73b5dc7a5a1.zip
A few cleanups to make things simpler.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/handler/waiter.py2
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py9
2 files changed, 4 insertions, 7 deletions
diff --git a/sleekxmpp/xmlstream/handler/waiter.py b/sleekxmpp/xmlstream/handler/waiter.py
index 12827d3b..1e101ed3 100644
--- a/sleekxmpp/xmlstream/handler/waiter.py
+++ b/sleekxmpp/xmlstream/handler/waiter.py
@@ -41,7 +41,7 @@ class Waiter(BaseHandler):
matcher -- A matcher object to detect the desired stanza.
stream -- Optional XMLStream instance to monitor.
"""
- BaseHandler.__init__(self, name, matcher)
+ BaseHandler.__init__(self, name, matcher, stream=stream)
self._payload = queue.Queue()
def prerun(self, payload):
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 86b528d1..f8242005 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -594,8 +594,8 @@ class ElementBase(object):
tag = components[0]
attributes = components[1:]
- if tag not in (self.name, "{%s}%s" % (self.namespace, self.name),
- self.plugins, self.plugin_attrib):
+ if tag not in (self.name, "{%s}%s" % (self.namespace, self.name)) and \
+ tag not in self.plugins and tag not in self.plugin_attrib:
# The requested tag is not in this stanza, so no match.
return False
@@ -786,14 +786,11 @@ class ElementBase(object):
# that do not have namespaces.
namespace = ns_block.split('}')[0]
elements = ns_block.split('}')[1].split('/')
- elif propagate_ns:
+ else:
# Apply the stanza's namespace to the following
# elements since no namespace was provided.
namespace = self.namespace
elements = ns_block.split('/')
- else:
- # We don't want to propagate namespaces.
- elements = ns_block.split('/')
for element in elements:
if element: