def __init__(self,node,error,reply=1):
        """ Create error reply basing on the received 'node' stanza and the 'error' error condition.
            If the 'node' is not the received stanza but locally created ('to' and 'from' fields needs not swapping)
            specify the 'reply' argument as false."""
        if reply: Protocol.__init__(self,to=node.getFrom(),frm=node.getTo(),node=node)
        else: Protocol.__init__(self,node=node)
        self.setError(error)
        if node.getType()=='error': self.__str__=self.__dupstr__
 Create error reply basing on the received 'node' stanza and the 'error' error condition.
            If the 'node' is not the received stanza but locally created ('to' and 'from' fields needs not swapping)
            specify the 'reply' argument as false.
chrome-cordova/gcmServer/xmpp/protocol.py