From: Douglas Bagnall Date: Wed, 5 Apr 2017 23:56:25 +0000 (+1200) Subject: samba_kcc: avoid crash on odd networks with --dot-file-dir X-Git-Tag: tdb-1.3.14~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=822c4b9852ff59e984c29f98f2cd5200c00283b3;p=thirdparty%2Fsamba.git samba_kcc: avoid crash on odd networks with --dot-file-dir Signed-off-by: Douglas Bagnall Reviewed-by: Garming Sam --- 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')