From 097a6cccdb0adc56b839ba597085e5ed7d0374be Mon Sep 17 00:00:00 2001 From: Tomas Zubiri Date: Wed, 4 Oct 2017 00:38:31 -0300 Subject: [PATCH] fixed escaping issues --- bonobo/commands/inspect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bonobo/commands/inspect.py b/bonobo/commands/inspect.py index dbb9a74..2646ce4 100644 --- a/bonobo/commands/inspect.py +++ b/bonobo/commands/inspect.py @@ -7,7 +7,9 @@ from bonobo.util.objects import get_name OUTPUT_GRAPHVIZ = 'graphviz' def _ident(graph, i): - return json.dumps('{} [label="{}"]'.format(str(i),get_name(graph[i]))) + escaped_index = str(i) + escaped_name = json.dumps(get_name(graph[i])) + return '{{{} [label={}]}}'.format(escaped_index,escaped_name) def execute(*, output, **kwargs): graph, plugins, services = read(**kwargs)