Refactor cable tracing logic

This commit is contained in:
Jeremy Stretch
2020-04-15 15:46:41 -04:00
parent 8319b89b42
commit e8ff7b7fd4
4 changed files with 61 additions and 47 deletions

View File

@@ -3,3 +3,12 @@ class LoopDetected(Exception):
A loop has been detected while tracing a cable path.
"""
pass
class CableTraceSplit(Exception):
"""
A cable trace cannot be completed because a RearPort maps to multiple FrontPorts and
we don't know which one to follow.
"""
def __init__(self, termination, *args, **kwargs):
self.termination = termination