summaryrefslogtreecommitdiffstats
path: root/avahi-utils/avahi/ServiceTypeDatabase.py.in
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-10-09 16:21:52 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-10-09 16:21:52 +0000
commit14493d4e41890251fbb24ebbdd1c36e8f2fc6a4b (patch)
tree0299ff09d8585d660611dac5d4d8b828006e3993 /avahi-utils/avahi/ServiceTypeDatabase.py.in
parent4cb11c30b9794d20ca7613ca7ea3d919a0a87f09 (diff)
* some progress on the browsing part
git-svn-id: file:///home/lennart/svn/public/avahi/branches/py-simple-api@707 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-utils/avahi/ServiceTypeDatabase.py.in')
-rw-r--r--avahi-utils/avahi/ServiceTypeDatabase.py.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/avahi-utils/avahi/ServiceTypeDatabase.py.in b/avahi-utils/avahi/ServiceTypeDatabase.py.in
index 9caeebd..93fcfd3 100644
--- a/avahi-utils/avahi/ServiceTypeDatabase.py.in
+++ b/avahi-utils/avahi/ServiceTypeDatabase.py.in
@@ -55,6 +55,13 @@ class ServiceTypeDatabase:
self.suffixes = tuple(map(lambda x: "["+x+"]", self.suffixes)) + ("", )
+ def lookup_service_type(self, stype):
+ try:
+ return self.db[stype]
+ except KeyError:
+ return "n/a"
+
+
def __getitem__(self, key):
for suffix in self.suffixes: