added pubsub state stanzas and scheduled events

This commit is contained in:
Nathan Fritz
2010-05-27 19:58:57 +08:00
committed by Thom Nichols
parent 2e7024419a
commit 194e6bcb51
8 changed files with 67 additions and 23 deletions

View File

@@ -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):