summaryrefslogtreecommitdiffstats
path: root/avahi-python/avahi/ServiceTypeDatabase.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-python/avahi/ServiceTypeDatabase.py.in')
-rw-r--r--avahi-python/avahi/ServiceTypeDatabase.py.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/avahi-python/avahi/ServiceTypeDatabase.py.in b/avahi-python/avahi/ServiceTypeDatabase.py.in
index 66b29c8..25807f3 100644
--- a/avahi-python/avahi/ServiceTypeDatabase.py.in
+++ b/avahi-python/avahi/ServiceTypeDatabase.py.in
@@ -71,7 +71,7 @@ class ServiceTypeDatabase:
items = []
key = self.db.firstkey()
while key is not None:
- if re.search('_\w*\._\w*', key) and not re.search('_\w*\._\w*\[.*\]', key):
+ if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key) and not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key):
localized_service_name = self[key]
items.append((key, localized_service_name))
key = self.db.nextkey(key)
@@ -100,6 +100,7 @@ class ServiceTypeDatabase:
if __name__ == "__main__":
b = ServiceTypeDatabase()
+ print b.items()
print b["_http._tcp"]
print b["_ftp._tcp"]