Router findCandidateReceivers clean-up

parent 0357c825
...@@ -112,15 +112,15 @@ class Operator(ObjectResource): ...@@ -112,15 +112,15 @@ class Operator(ObjectResource):
#=========================================================================== #===========================================================================
# method that finds a candidate entity for an operator # method that finds a candidate entity for an operator
#=========================================================================== #===========================================================================
def findCandidateStation(self, conflictingStations=[]): def findCandidateStation(self):
conflicting=conflictingStations
from Globals import G from Globals import G
candidateStation=next(x for x in self.candidateStations if not x in conflicting) router=G.Router
if not G.Router.sorting: candidateStation=next(x for x in self.candidateStations if not x in router.conflictingStations)
if not router.sorting:
if not candidateStation: if not candidateStation:
candidateStation=next(x for x in self.candidateStations) candidateStation=next(x for x in self.candidateStations)
conflicting.append(candidateStation) router.conflictingStations.append(candidateStation)
return candidateStation, conflictingStations return candidateStation
#=========================================================================== #===========================================================================
# recursive method that searches for entities with available receivers # recursive method that searches for entities with available receivers
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment