From 75ee4e8aa957d4f04e107130fe69d61e6b215763 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 25 Mar 2018 03:08:28 +0200 Subject: contrib/fsm-to-dot: add default edge label '-' When some edges have no label, it is sometimes hard to interpret which label belongs to which edge. Adding a '-' default label clarifies the edge labeling. Change-Id: I3a10b615288107e8fc12ffdbbe0099cf51abe94f --- contrib/fsm-to-dot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/fsm-to-dot.py b/contrib/fsm-to-dot.py index 7a4694e7..872577e8 100755 --- a/contrib/fsm-to-dot.py +++ b/contrib/fsm-to-dot.py @@ -532,7 +532,10 @@ class Fsm: if out_edge.actions: labels.extend(out_edge.action_labels()) if labels: - attrs.append('label="%s"' % (r'\n'.join(labels))) + label = r'\n'.join(labels) + else: + label = '-' + attrs.append('label="%s"' % label) if out_edge.style: attrs.append('style=%s'% out_edge.style) if out_edge.color: -- cgit v1.2.3