def process_response(self, req, resp, resource): """ Post-processing of the response (after routing). """ if resp.status in DAOTransaction.__OK_STATUSES: AbstractDAO.commit() else: assert resp.status not in DAOTransaction.__OK_STATUSES AbstractDAO.rollback()