def commit_error_handler(error): if re.search("resource out of date", error.output): raise CheckoutNeedsUpdate(script_args=error.script_args, exit_code=error.exit_code, output=error.output, cwd=error.cwd) Executive.default_error_handler(error)