summaryrefslogtreecommitdiff
path: root/python/samba/kcc
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2017-04-06 11:56:25 +1200
committerDouglas Bagnall <dbagnall@samba.org>2017-06-23 02:25:25 +0200
commit822c4b9852ff59e984c29f98f2cd5200c00283b3 (patch)
tree95cf9adc29a3f8d0b83c17109b47387d130112f7 /python/samba/kcc
parent84ea6bc645ac04fcd77941a4fe3f74b0e46e556f (diff)
downloadsamba-822c4b9852ff59e984c29f98f2cd5200c00283b3.tar.gz
samba_kcc: avoid crash on odd networks with --dot-file-dir
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'python/samba/kcc')
-rw-r--r--python/samba/kcc/graph_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/kcc/graph_utils.py b/python/samba/kcc/graph_utils.py
index 704f70d08e9..e3269523624 100644
--- a/python/samba/kcc/graph_utils.py
+++ b/python/samba/kcc/graph_utils.py
@@ -49,6 +49,10 @@ def write_dot_file(basename, edge_list, vertices=None, label=None,
for i, edge in enumerate(edge_list):
a, b = edge
+ if a is None:
+ a = "Missing source value"
+ if b is None:
+ b = "Missing destination value"
if reformat_labels:
a = a.replace(',', '\\n')
b = b.replace(',', '\\n')