restore PATH test for graphviz
@@ -274,7 +274,10 @@ class ExtendedRoadRunner(roadrunner.RoadRunner):
# PATH variable may not be present - cannot use os.environ['PATH']
# but can use shutil.which for Python 3.3+
if hasattr(shutil, 'which') and shutil.which('dot') is None:
- warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
+ warnings.warn("Graphviz is not installed in your machine or could not be found. 'draw' command cannot produce a diagram.",
+ Warning, stacklevel=2)
+ elif not 'PATH' in os.environ or any([ os.access( os.path.join( p, 'dot' ), os.X_OK ) for p in os.environ['PATH'].split( os.pathsep )]):
+ warnings.warn("Graphviz is not installed in your machine or could not be found. 'draw' command cannot produce a diagram.",
Warning, stacklevel=2)
else:
from tellurium import SBMLDiagram
