From 385234c8bbbf7f26f1147839d04415d4a5c348e6 Mon Sep 17 00:00:00 2001 From: k30060800 Date: Sat, 1 Jun 2024 12:10:20 +0800 Subject: [PATCH] Handle invaild path in check_path_owner_consistent with RuntimeError --- profiler/cluster_analyse/common_func/path_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiler/cluster_analyse/common_func/path_manager.py b/profiler/cluster_analyse/common_func/path_manager.py index 7ef7b4c345..04fdd171ea 100644 --- a/profiler/cluster_analyse/common_func/path_manager.py +++ b/profiler/cluster_analyse/common_func/path_manager.py @@ -107,8 +107,8 @@ class PathManager: """ base_name = os.path.basename(path) if not os.path.exists(path): - msg = f"Invalid path: {base_name}" - raise RuntimeError(msg) + print(f"Error: Invalid path: {base_name}") + sys.exit(1) if platform.system().lower() == cls.WINDOWS: return if os.stat(path).st_uid != os.getuid(): -- Gitee