Spaces:
Runtime error
Runtime error
File size: 633 Bytes
8044721 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import sys;
def report(graph, message, node = None, edge = None,
framework = None, level = "E", stream = sys.stderr):
if node is not None:
node = "; node #{}".format(node.id);
else:
node = "";
if edge is not None:
edge = "; edge {} -{}-> {}".format(edge.src, edge.tgt,
edge.lab if edge.lab else "");
else:
edge = "";
if framework is not None:
framework = "{{{}}} ".format(framework);
else:
framework = "";
print("validate(): [{}] {}graph #{}{}{}: {}."
"".format(level, framework, graph.id, node, edge, message),
file = stream);
|