From 817dccee1d72f48a0c9112917d5a0d302b7424b3 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 May 2020 15:01:15 +0800 Subject: [PATCH] fix the exception for file don't exist --- mindinsight/profiler/parser/aicpu_data_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mindinsight/profiler/parser/aicpu_data_parser.py b/mindinsight/profiler/parser/aicpu_data_parser.py index 6368b47..2cf6d24 100644 --- a/mindinsight/profiler/parser/aicpu_data_parser.py +++ b/mindinsight/profiler/parser/aicpu_data_parser.py @@ -15,6 +15,7 @@ """ The parser for AI CPU preprocess data. """ +import os from tabulate import tabulate @@ -50,7 +51,7 @@ class DataPreProcessParser: def execute(self): """Execute the parser, get result data, and write it to the output file.""" - if self._source_file_name is None: + if not os.path.exists(self._source_file_name): logger.info("Did not find the aicpu profiling source file") return -- GitLab