X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-utils%2Favahi-bookmarks.in;h=07ca8f06e79decfd6dbd335cf774ae8658379edd;hb=4ddfb3cc4ac10efff11fc58693ae2aacf592fb73;hp=2dd01beedcf7e90a82046dc4633283a4f58175f9;hpb=9152918f91b7b6abffadfef500f0c6b8e3d9d317;p=catta diff --git a/avahi-utils/avahi-bookmarks.in b/avahi-utils/avahi-bookmarks.in index 2dd01be..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" } @@ -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 += ''