From f453e56fab195cca3c8ef45b4d2d7065af5c2a12 Mon Sep 17 00:00:00 2001 From: piggyguy_jdx Date: Sat, 20 Jul 2024 12:46:05 +0000 Subject: [PATCH] fix tool bug Signed-off-by: piggyguy_jdx --- .../event_tree_to_graph/src/graph/graph_converter.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/tools/event_tree_to_graph/src/graph/graph_converter.py b/test/tools/event_tree_to_graph/src/graph/graph_converter.py index 8e685f11645..a825c4216d6 100644 --- a/test/tools/event_tree_to_graph/src/graph/graph_converter.py +++ b/test/tools/event_tree_to_graph/src/graph/graph_converter.py @@ -15,7 +15,12 @@ # limitations under the License. # -import os.path + +# convert the dump result into graphical representation + +import os +import shutil + from typing import List from graphviz import Digraph from src.beans.event_node import EventNode @@ -32,9 +37,7 @@ edge_colors = ['black', 'blue', 'brown', 'purple', 'yellow', 'pink', 'gray'] def reset_output_dir(): - import os if os.path.exists(output_folder): - import shutil shutil.rmtree(output_folder) os.mkdir(output_folder) -- Gitee