def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup. Arguments: xml -- Use an existing XML object for the stanza's values. """ # To comply with PEP8, method names now use underscores. # Deprecated method names are re-mapped for backwards compatibility. self.setShow = self.set_show self.getType = self.get_type self.setType = self.set_type self.delType = self.get_type self.getPriority = self.get_priority self.setPriority = self.set_priority return StanzaBase.setup(self, xml)
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides StanzaBase.setup. Arguments: xml -- Use an existing XML object for the stanza's values. """ # To comply with PEP8, method names now use underscores. # Deprecated method names are re-mapped for backwards compatibility. self.getType = self.get_type self.getMucroom = self.get_mucroom self.setMucroom = self.set_mucroom self.delMucroom = self.del_mucroom self.getMucnick = self.get_mucnick self.setMucnick = self.set_mucnick self.delMucnick = self.del_mucnick return StanzaBase.setup(self, xml)
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup. Sets a default error type and condition, and changes the parent stanza's type to 'error'. Arguments: xml -- Use an existing XML object for the stanza's values. """ # StanzaBase overrides self.namespace self.namespace = Failure.namespace if StanzaBase.setup(self, xml): #If we had to generate XML then set default values. self['condition'] = 'not-authorized' self.xml.tag = self.tag_name()
def setup(self, xml): StanzaBase.setup(self, xml) self.values = self.values
def setup(self, xml): StanzaBase.setup(self, xml) self.xml.tag = self.tag_name()