X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FNodePath.py;fp=resources%2Flibraries%2Fpython%2FNodePath.py;h=6700ddfe2a56aec5fc0e5b9bf2ee4416e2e538fd;hp=d1aa1f76d4bbf21c4d7b6d1fafb4e5e102a7bd29;hb=3936756adb84508ef7ada2cc9016eb449fba2024;hpb=ae0e807c1ea95d3f2ec16a4c7aa9ee027d18c854 diff --git a/resources/libraries/python/NodePath.py b/resources/libraries/python/NodePath.py index d1aa1f76d4..6700ddfe2a 100644 --- a/resources/libraries/python/NodePath.py +++ b/resources/libraries/python/NodePath.py @@ -115,6 +115,10 @@ class NodePath(object): l_set = set(links).intersection(self._links) else: l_set = set(links).difference(self._links) + if not l_set: + raise RuntimeError( + 'No free link between {0} and {1}, all links already ' + + 'used'.format(node1['host'], node2['host'])) if not l_set: link = links.pop()