Exemplo n.º 1
0
    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()
Exemplo n.º 2
0
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.xml.tag = self.tag_name()
Exemplo n.º 3
0
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.xml.tag = self.tag_name()
Exemplo n.º 4
0
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.values = self.values
Exemplo n.º 5
0
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.values = self.values