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 <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user