From 822c4b9852ff59e984c29f98f2cd5200c00283b3 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 6 Apr 2017 11:56:25 +1200 Subject: [PATCH] samba_kcc: avoid crash on odd networks with --dot-file-dir Signed-off-by: Douglas Bagnall Reviewed-by: Garming Sam --- python/samba/kcc/graph_utils.py | 4 ++++ 1 file changed, 4 insertions(+) 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') -- 2.47.2