diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-06-01 16:55:37 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2018-06-10 19:02:20 +0200 |
| commit | d8bbe1da93433cf7440d780c7cb4a627c3cbd635 (patch) | |
| tree | b19fdf3ba6ab079daf9e74cd9a9b72012bca014d /python | |
| parent | 87926094040621e46534a305a8eec9dc75551711 (diff) | |
| download | samba-d8bbe1da93433cf7440d780c7cb4a627c3cbd635.tar.gz samba-d8bbe1da93433cf7440d780c7cb4a627c3cbd635.tar.bz2 samba-d8bbe1da93433cf7440d780c7cb4a627c3cbd635.zip | |
python/graph: don't crash colourer on bad link
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/graph.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/samba/graph.py b/python/samba/graph.py index 17626e0a361..0c389a74e3a 100644 --- a/python/samba/graph.py +++ b/python/samba/graph.py @@ -517,6 +517,8 @@ def get_transitive_colourer(colours, n_vertices): n = 1 + int(n_vertices ** 0.5) def f(link): + if not isinstance(link, int): + return '' return scale[min(link * m // n, m - 1)] else: |
