From: Yu-hsin Wang Date: Mon, 2 Mar 2020 03:11:10 +0000 (+0800) Subject: python: Add a warning if pydot is not available. X-Git-Tag: v20.0.0.0~437 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e29d768226e0f2ad3c996d1e0a7f332111da375d;p=gem5.git 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 --- 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