summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-25 03:08:28 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-03-26 13:03:20 +0000
commit75ee4e8aa957d4f04e107130fe69d61e6b215763 (patch)
tree6d04bfe406bd0a07ab631d2702c1653f9f9ec9d0 /contrib
parentfcf79926e5e5d296efc4d53b1c50849e4fff7908 (diff)
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
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fsm-to-dot.py5
1 files changed, 4 insertions, 1 deletions
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: