Skip to content

Commit

Permalink
Merge pull request #46 from AdriaanRol/feat/plotless_option
Browse files Browse the repository at this point in the history
plotless option
  • Loading branch information
AdriaanRol authored Jun 19, 2017
2 parents 7658917 + 03b0f16 commit 64b21aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autodepgraph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
except ImportError:
plot_mode = 'mpl'

try:
import pygraphviz
except ImportError:
logging.warning('pygraphviz is not installed, plotting will be disabled')
plot_mode = 'none'


class Graph(Instrument):
"""
Expand Down Expand Up @@ -111,6 +117,8 @@ def clear_node_state(self):
def update_monitor(self):
if self.plot_mode == 'mpl':
self.update_monitor_mpl()
elif self.plot_mode == 'none':
return
else:
self.update_monitor_pg()

Expand Down

0 comments on commit 64b21aa

Please sign in to comment.