more information on the sdr list

This commit is contained in:
Jakob Ketterl
2021-02-27 20:48:37 +01:00
parent 6a9bbf7bc9
commit ccdb010e9d
2 changed files with 28 additions and 3 deletions

View File

@ -298,9 +298,13 @@ class SdrSource(ABC):
if self.monitor:
self.monitor.join()
def getClients(self, *args):
if not args:
return self.clients
return [c for c in self.clients if c.getClientClass() in args]
def hasClients(self, *args):
clients = [c for c in self.clients if c.getClientClass() in args]
return len(clients) > 0
return len(self.getClients(*args)) > 0
def addClient(self, c: SdrSourceEventClient):
if c in self.clients: