From 79618874802b8b52ffa9218e26c3deb0edb27457 Mon Sep 17 00:00:00 2001 From: Lars Olzem Date: Sun, 7 Jul 2024 11:30:07 +0000 Subject: [PATCH] Query: fix AttributeError --- tinyoscquery/query.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tinyoscquery/query.py b/tinyoscquery/query.py index d3ce967..b6e3c46 100644 --- a/tinyoscquery/query.py +++ b/tinyoscquery/query.py @@ -47,7 +47,10 @@ def get_discovered_oscquery(self): def find_service_by_name(self, name): for svc in self.get_discovered_oscquery(): client = OSCQueryClient(svc) - if name in client.get_host_info().name: + host_info = client.get_host_info() + if host_info is None: + continue + if name in host_info.name: return svc return None