git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6057c25
)
KCC: avoid infinite recursion when edgelist contains self
author
Douglas Bagnall
<douglas.bagnall@catalyst.net.nz>
Wed, 2 Nov 2016 03:49:49 +0000
(16:49 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 1 Dec 2016 04:54:24 +0000
(
05:54
+0100)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
python/samba/kcc/kcc_utils.py
patch
|
blob
|
history
diff --git
a/python/samba/kcc/kcc_utils.py
b/python/samba/kcc/kcc_utils.py
index 1d4b9d61f18a4f6db7453fe57d5ee9cdd2335738..aefe1aa1a85d30cd6d816ef8072a47f4a8e0e353 100644
(file)
--- a/
python/samba/kcc/kcc_utils.py
+++ b/
python/samba/kcc/kcc_utils.py
@@
-1791,7
+1791,9
@@
class GraphNode(object):
text = text + "\n\tmax_edges=%d" % self.max_edges
for i, edge in enumerate(self.edge_from):
- text = text + "\n\tedge_from[%d]=%s" % (i, edge)
+ if isinstance(edge, str):
+ text += "\n\tedge_from[%d]=%s" % (i, edge)
+
return text
def add_edge_from(self, from_dsa_dnstr):
@@
-1799,7
+1801,7
@@
class GraphNode(object):
:param from_dsa_dnstr: the dsa that the edge emanates from
"""
- assert
from_dsa_dnstr is not None
+ assert
isinstance(from_dsa_dnstr, str)
# No edges from myself to myself
if from_dsa_dnstr == self.dsa_dnstr: