aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/NodePath.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/NodePath.py')
-rw-r--r--resources/libraries/python/NodePath.py4
1 files changed, 4 insertions, 0 deletions
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()