diff --git a/avahi-python/avahi-bookmarks.in b/avahi-python/avahi-bookmarks.in index dea7bef..f920c14 100755 --- a/avahi-python/avahi-bookmarks.in +++ b/avahi-python/avahi-bookmarks.in @@ -17,12 +17,20 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. +from __future__ import print_function + import sys, getopt, os try: - import avahi, gobject, dbus + import avahi, dbus +except ImportError: + print("Sorry, to use this tool you need to install Avahi and python-dbus.") + sys.exit(1) + +try: + from gi.repository import GObject except ImportError: - print "Sorry, to use this tool you need to install Avahi and python-dbus." + print("Sorry, to use this tool you need to install GObject Introspection.") sys.exit(1) try: @@ -95,7 +103,7 @@ class AvahiBookmarks: else: t += '