Browse Source

profiler: fixed error msg in timeline rest api

tags/v0.6.0-beta
zhangyunshu 5 years ago
parent
commit
5871887c0b
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      mindinsight/backend/profiler/profile_api.py

+ 2
- 4
mindinsight/backend/profiler/profile_api.py View File

@@ -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')


Loading…
Cancel
Save