From a7137dbc0b8cd54d7d3aa3df5c5aee4a1d244bf5 Mon Sep 17 00:00:00 2001 From: yaokai13 Date: Thu, 12 Aug 2021 15:52:52 +0800 Subject: [PATCH] fix bug for error_flag --- core/check_release_management.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/check_release_management.py b/core/check_release_management.py index 6b4eda5..5d9aa8e 100644 --- a/core/check_release_management.py +++ b/core/check_release_management.py @@ -141,6 +141,7 @@ class CheckReleaseManagement(object): """ Detects the existence of file contents """ + error_flag = False for yaml_path in yaml_path_list: log.debug(yaml_path + ":") for pkg_path in yaml_msg[yaml_path]: @@ -148,9 +149,8 @@ class CheckReleaseManagement(object): if not os.path.exists(pkg_dir_path): log.error("The {0} not exist in obs_meta".format(pkg_path)) error_flag = True - if not error_flag: - log.debug("All rpms exist") - error_flag = False + if not error_flag: + log.debug("All rpms exist") return error_flag def check_pckg_yaml(self): -- Gitee