Added check for destination direction on annonuce

This commit is contained in:
Mark Qvist 2023-09-19 10:11:45 +02:00
parent 70cbb8dc79
commit 21c6dbfce0
1 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,9 @@ class Destination:
""" """
if self.type != Destination.SINGLE: if self.type != Destination.SINGLE:
raise TypeError("Only SINGLE destination types can be announced") raise TypeError("Only SINGLE destination types can be announced")
if self.direction != Destination.IN:
raise TypeError("Only IN destination types can be announced")
now = time.time() now = time.time()
stale_responses = [] stale_responses = []