summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-05-27 19:58:57 +0800
committerThom Nichols <tmnichols@gmail.com>2010-06-01 22:07:52 +0800
commit194e6bcb5149f145c389fa8837dbe902557d9215 (patch)
tree9833402892ca0d1f738fc321cfb3c084da590854 /sleekxmpp/xmlstream/stanzabase.py
parent2e7024419a98e0dc69493010faf24b4a2c88d37e (diff)
downloadslixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.gz
slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.bz2
slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.xz
slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.zip
added pubsub state stanzas and scheduled events
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 3f3f5e08..c40922be 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -319,6 +319,8 @@ class StanzaBase(ElementBase):
def __init__(self, stream=None, xml=None, stype=None, sto=None, sfrom=None, sid=None):
self.stream = stream
+ if stream is not None:
+ self.namespace = stream.default_ns
ElementBase.__init__(self, xml)
if stype is not None:
self['type'] = stype
@@ -326,8 +328,6 @@ class StanzaBase(ElementBase):
self['to'] = sto
if sfrom is not None:
self['from'] = sfrom
- if stream is not None:
- self.namespace = stream.default_ns
self.tag = "{%s}%s" % (self.namespace, self.name)
def setType(self, value):