'Get the URL to cancel this request.
Useful for creating a "Cancel" button on a web form so that operation
can be carried out directly without another trip through the server.
(Except you probably want to make another trip through the server so
that it knows that the user did make a decision.  Or you could simulate
this method by doing C{.answer(False).encodeToURL()})
@returntype: str
@returns: The return_to URL with openid.mode = cancel.
@raises NoReturnError: when I do not have a return_to.'

def getCancelURL(self):

    if (not self.return_to):
        raise NoReturnToError
    if self.immediate:
        raise ValueError('Cancel    is    not    an    appropriate    response    to    immediate    mode    requests.')
    response = Message(self.message.getOpenIDNamespace())
    response.setArg(OPENID_NS, 'mode', 'cancel')
    return response.toURL(self.return_to)
