def _fail(reason): if raises: raise BadCSRFOrigin(reason) else: return False
def _fail(reason): if raises: raise BadCSRFOrigin("Origin checking failed - " + reason) else: return False