mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
kcc graph verifier: use __doc__ description for error explanation
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
03bd7c20f0
commit
e62cc29b47
@ -188,7 +188,7 @@ def get_spanning_tree_edges(graph, my_site, label=None, verify=False,
|
||||
properties=('complete', 'connected'))
|
||||
if errors:
|
||||
DEBUG('spanning tree edge set %s FAILED' % edgeType)
|
||||
for p, e in errors:
|
||||
for p, e, doc in errors:
|
||||
DEBUG("%18s: %s" % (p, e))
|
||||
raise KCCError("spanning tree failed")
|
||||
|
||||
|
@ -294,7 +294,7 @@ def verify_graph(edges, vertices=None, directed=False, properties=()):
|
||||
try:
|
||||
f(edges, vertices, edge_vertices)
|
||||
except GraphError as e:
|
||||
errors.append((p, e))
|
||||
errors.append((p, e, f.__doc__))
|
||||
|
||||
return errors
|
||||
|
||||
@ -319,13 +319,13 @@ def verify_and_dot(basename, edges, vertices=None, label=None,
|
||||
if errors:
|
||||
title = '%s %s' % (basename, label or '')
|
||||
debug(("%s%s%s FAILED:" % (MAGENTA, title, RED)))
|
||||
for p, e in errors:
|
||||
for p, e, doc in errors:
|
||||
debug(" %18s: %s%s%s" % (p, DARK_YELLOW, e, RED))
|
||||
if fatal:
|
||||
raise GraphError("The '%s' graph lacks the following "
|
||||
"properties:\n%s" %
|
||||
(title, '\n'.join('%s: %s' % x
|
||||
for x in errors)))
|
||||
(title, '\n'.join('%s: %s' % (p, e)
|
||||
for p, e, doc in errors)))
|
||||
|
||||
|
||||
def list_verify_tests():
|
||||
|
Loading…
Reference in New Issue
Block a user