diff --git a/krkn/rollback/handler.py b/krkn/rollback/handler.py index cd671201..0b0cfdb0 100644 --- a/krkn/rollback/handler.py +++ b/krkn/rollback/handler.py @@ -1,3 +1,19 @@ +#!/usr/bin/env python +# +# Copyright 2025 The Krkn Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import annotations import logging @@ -132,8 +148,8 @@ def execute_rollback_version_files( :param ignore_auto_rollback_config: Flag to ignore auto rollback configuration. Will be set to True for manual execute-rollback calls. """ if not ignore_auto_rollback_config and RollbackConfig().auto is False: - logger.warning(f"Auto rollback is disabled, skipping execution for run_uuid={run_uuid or '*'}, scenario_type={scenario_type or '*'}") - return + logger.warning(f"Auto rollback is disabled, skipping execution for run_uuid={run_uuid or '*'}, scenario_type={scenario_type or '*'}") + return # Get the rollback versions directory version_files = RollbackConfig.search_rollback_version_files(run_uuid, scenario_type)