Fix django multiple command output.

This commit is contained in:
Romain Dorgueil
2018-10-27 15:39:25 +02:00
parent 5499c548b0
commit 71ee340126

View File

@ -61,9 +61,11 @@ class ETLCommand(BaseCommand):
for i, graph in enumerate(graph_coll):
if not isinstance(graph, bonobo.Graph):
raise ValueError('Expected a Graph instance, got {!r}.'.format(graph))
print(term.lightwhite('{}. {}'.format(i + 1, graph.name)))
print(term.lightwhite('{}. {}'.format(i + 1, graph.name or repr(graph).strip('<>'))))
result = bonobo.run(graph, services=services, strategy=strategy)
results.append(result)
for node in result.nodes:
print(node.get_statistics_as_string(), node.get_flags_as_string())
print(term.lightblack(" ... return value: " + str(result)))
print()