python/kcc/graph_utils: short-cut edge failure test without edges
commitf27a700e69974ccc3e1c722050cd8d72d904eeca
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 9 Jun 2018 08:07:37 +0000 (9 20:07 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 10 Jun 2018 17:02:19 +0000 (10 19:02 +0200)
tree51e1a453d68a2520f7969a37baf1ebd4558e646c
parente5c0e6da6593fb77d5a16ece9aa85532d855d2be
python/kcc/graph_utils: short-cut edge failure test without edges

Otherwise we get an exception because itertools.combinations is asked
to find combinations with negative size.

Instead we assert the graph is connected as-is, which in this case is
the same as asserting there are no vertices.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/kcc/graph_utils.py