From 5871887c0b716aad87f1446616fe34f21e395297 Mon Sep 17 00:00:00 2001 From: zhangyunshu Date: Mon, 29 Jun 2020 17:43:16 +0800 Subject: [PATCH] profiler: fixed error msg in timeline rest api --- mindinsight/backend/profiler/profile_api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mindinsight/backend/profiler/profile_api.py b/mindinsight/backend/profiler/profile_api.py index 1db32b0..6eebd74 100644 --- a/mindinsight/backend/profiler/profile_api.py +++ b/mindinsight/backend/profiler/profile_api.py @@ -430,8 +430,7 @@ def get_timeline_summary(): summary_dir = request.args.get("dir") profiler_dir = validate_and_normalize_profiler_path(summary_dir, settings.SUMMARY_BASE_DIR) if not os.path.exists(profiler_dir): - msg = 'The profiler dir is not found!' - raise ProfilerDirNotFoundException(msg=msg) + raise ProfilerDirNotFoundException(msg=summary_dir) device_id = request.args.get("device_id", default='0') _ = to_int(device_id, 'device_id') @@ -456,8 +455,7 @@ def get_timeline_detail(): summary_dir = request.args.get("dir") profiler_dir = validate_and_normalize_profiler_path(summary_dir, settings.SUMMARY_BASE_DIR) if not os.path.exists(profiler_dir): - msg = 'The profiler dir is not found!' - raise ProfilerDirNotFoundException(msg=msg) + raise ProfilerDirNotFoundException(msg=summary_dir) device_id = request.args.get("device_id", default='0') _ = to_int(device_id, 'device_id') -- GitLab