X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-utils%2Favahi-bookmarks.in;h=07ca8f06e79decfd6dbd335cf774ae8658379edd;hb=4ddfb3cc4ac10efff11fc58693ae2aacf592fb73;hp=953020a5978f93a825931e602dadef89eb5de815;hpb=aa458a0a13d18882354f33c07b0a4e8e82e7a424;p=catta diff --git a/avahi-utils/avahi-bookmarks.in b/avahi-utils/avahi-bookmarks.in index 953020a..07ca8f0 100755 --- a/avahi-utils/avahi-bookmarks.in +++ b/avahi-utils/avahi-bookmarks.in @@ -38,7 +38,7 @@ try: from twisted.internet import reactor from twisted.web import server, resource except ImportError: - print "Sorry, to use this tool you need to install twisted." + print "Sorry, to use this tool you need to install twisted and twisted.web." sys.exit(1) urlproto = { "_http._tcp" : "http", "_https._tcp" : "https", "_ftp._tcp" : "ftp" } @@ -59,7 +59,7 @@ class AvahiBookmarks(resource.Resource): self.browse_service_type("_http._tcp") # Hurrah! if I enable one of the following lines, python segfaults. - #self.browse_service_type("_shttp._tcp") + #self.browse_service_type("_https._tcp") #self.browse_service_type("_ftp._tcp") def browse_service_type(self, stype): @@ -96,7 +96,12 @@ class AvahiBookmarks(resource.Resource): path = self.find_path(v[4]) - t += '
  • %s
  • ' % (urlproto[k[3]], v[2], port, path, k[2]) + if v[1] == avahi.PROTO_INET6: + ip = "[" + v[2] + "]" + else: + ip = v[2] + + t += '
  • %s
  • ' % (urlproto[k[3]], ip, port, path, k[2]) t += ''