From e29d768226e0f2ad3c996d1e0a7f332111da375d Mon Sep 17 00:00:00 2001 From: Yu-hsin Wang Date: Mon, 2 Mar 2020 11:11:10 +0800 Subject: [PATCH] python: Add a warning if pydot is not available. Silently failing makes it hard to debug what happened. Add a warning. Change-Id: Ia61b8de937bb254898726ad551fb5c894104d771 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26045 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- src/python/m5/util/dot_writer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py index f62431b01..e6de3f321 100644 --- a/src/python/m5/util/dot_writer.py +++ b/src/python/m5/util/dot_writer.py @@ -338,6 +338,8 @@ def dot_create_dvfs_nodes(simNode, callgraph, domain=None): def do_dot(root, outdir, dotFilename): if not pydot: + warn("No dot file generated. " + + "Please install pydot to generate the dot file and pdf.") return # * use ranksep > 1.0 for for vertical separation between nodes # especially useful if you need to annotate edges using e.g. visio @@ -358,6 +360,8 @@ def do_dot(root, outdir, dotFilename): def do_dvfs_dot(root, outdir, dotFilename): if not pydot: + warn("No dot file generated. " + + "Please install pydot to generate the dot file and pdf.") return # There is a chance that we are unable to resolve the clock or -- 2.30.2