Skip to content

Commit

Permalink
replace platform-specific checks with platform-independent checks for…
Browse files Browse the repository at this point in the history
… graphviz, fix #151
  • Loading branch information
0u812 committed Nov 17, 2016
1 parent f549980 commit c643a81
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tellurium/tellurium.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,10 +728,7 @@ def draw(self, **kwargs):
shaded in blue), reactions as grey squares.
Currently only the drawing of medium-size networks is supported.
"""
if sys.platform == 'win32' and 'Graphviz' not in os.environ['PATH']:
warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
Warning, stacklevel=2)
elif sys.platform == 'darwin' and 'graphviz' not in os.environ['PATH']:
if 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. 'draw' command cannot produce a diagram",
Warning, stacklevel=2)
else:
Expand Down

0 comments on commit c643a81

Please sign in to comment.