10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Fix graphiz

This commit is contained in:
Thomas Applencourt 2015-07-28 09:46:38 +02:00
parent e4d2eda17f
commit 97df8d1922

View File

@ -180,13 +180,7 @@ class ModuleHandler():
basename = "tree_dependency" basename = "tree_dependency"
path = '{0}.png'.format(basename) path = '{0}.png'.format(basename)
# Init
try:
from graphviz import Digraph from graphviz import Digraph
except:
with open(path, 'a'):
os.utime(path, None)
return
all_ready_done = [] all_ready_done = []
@ -209,7 +203,12 @@ class ModuleHandler():
graph.node(module, fontcolor="red") graph.node(module, fontcolor="red")
draw_module_edge(module, d_ref[module]) draw_module_edge(module, d_ref[module])
try:
graph.render(cleanup=True) graph.render(cleanup=True)
except:
with open(path, 'a'):
os.utime(path, None)
return
if __name__ == '__main__': if __name__ == '__main__':