From 36d9fe344762b6fbf999dc84b38f84e427f7e8fc Mon Sep 17 00:00:00 2001 From: j30031267 Date: Tue, 5 Sep 2023 14:34:15 +0800 Subject: [PATCH] =?UTF-8?q?[fix]dump=E7=9A=84=E8=BE=93=E5=87=BA=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=97=B6=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py index bc2313448eb..9cb31b5603e 100644 --- a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py +++ b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py @@ -146,6 +146,10 @@ def set_dump_path(fpath=None, dump_tag='ptdbg_dump'): return check_file_valid(fpath) real_path = os.path.realpath(fpath) + if not os.path.exists(real_path): + os.makedirs(real_path) + os.chmod(real_path, 0o750) + print_info_log("create a directory named '{}' as dump_path.".format(real_path)) if not os.path.isdir(real_path): print_error_log( "set_dump_path '{}' error, the path is not a directory please set a valid directory.".format(real_path)) -- Gitee