X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-utils%2Favahi-bookmarks.in;h=72f8e44981b945c0242ed4020771713721b621d0;hb=ae5476c763ae89cdef130397439b6746883cb1b5;hp=7504349cfa7f954f154568a43e6c83ab0735d725;hpb=3b199a0e8d433a6a1ad5d317f15300ec19182fae;p=catta diff --git a/avahi-utils/avahi-bookmarks.in b/avahi-utils/avahi-bookmarks.in index 7504349..72f8e44 100755 --- a/avahi-utils/avahi-bookmarks.in +++ b/avahi-utils/avahi-bookmarks.in @@ -19,18 +19,27 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. -import avahi, dbus, gobject, sys +import sys -from twisted.internet import gtk2reactor -gtk2reactor.install() -from twisted.internet import reactor -from twisted.web import server, resource +try: + import avahi, gobject, dbus +except ImportError: + print "Sorry, to use this tool you need to install Avahi, pygtk and python-dbus." + sys.exit(1) try: import dbus.glib -except ImportError, e: +except ImportError: pass +try: + from twisted.internet import gtk2reactor + gtk2reactor.install() + from twisted.internet import reactor + from twisted.web import server, resource +except ImportError: + print "Sorry, to use this tool you need to install twisted." + sys.exit(1) class AvahiBookmarks(resource.Resource): isLeaf = True