From ca1bc24f653e25c36ce858d379d7133f8fe913d9 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Fri, 19 Oct 2018 14:59:09 +0200 Subject: [PATCH] fix: [graph.py] small fix to make it work --- tools/graph.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/graph.py b/tools/graph.py index 079a764..dc41201 100755 --- a/tools/graph.py +++ b/tools/graph.py @@ -117,7 +117,7 @@ def gen_dot(uuid): node_params.append('shape=box') node_params.append('style=filled,color=deepskyblue') else: - node_params.append('shape=ellipse') + node_params.append('shape=ellipse') dot.append('"{src}" [{params}];'.format( src=src_tag, params=','.join(node_params) @@ -151,7 +151,7 @@ def gen_dot(uuid): # print(new_things_to_keep) things_to_keep = new_things_to_keep.copy() - + return dot if args.uuid: @@ -162,8 +162,8 @@ if args.uuid: dot.append('overlap=scale;') generated_dot = gen_dot(uuid) if len(generated_dot) == 0: - print("Empty graph for uuid: {}".format(uuid)) - exit() + print("Empty graph for uuid: {}".format(uuid)) + exit() print("Generating graph for uuid: {}".format(uuid)) dot += generated_dot # dot.append('}') @@ -182,14 +182,14 @@ elif args.all: if len(generated_dot) == 0: print("Empty graph for uuid: {}".format(uuid)) continue - + print("Generating graph for uuid: {}".format(uuid)) dot += generated_dot # dot.append('}') # dg.source = '\n'.join(dot) dg = Digraph(format='png', body=dot) - # print(dg.source) - dg.render(engine='dot', filename='graphs/{}'.format(uuid), cleanup=False) + #print(dg.source) + dg.render(filename='graphs/{}'.format(uuid)) else: exit("No parameters given, use --help for more info.")