From e6325a8e9f359de3ffed159757886b2535cc49a9 Mon Sep 17 00:00:00 2001 From: Thomas Jollans Date: Thu, 4 Oct 2018 01:25:31 +0200 Subject: [PATCH] Make avahi-bookmarks Python3 compatible Should work with Python 2, but this has not been tested. Not that anybody uses python 2 anymore anyway. --- avahi-python/avahi-bookmarks.in | 48 +++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/avahi-python/avahi-bookmarks.in b/avahi-python/avahi-bookmarks.in index dea7bef..7a562e3 100755 --- a/avahi-python/avahi-bookmarks.in +++ b/avahi-python/avahi-bookmarks.in @@ -20,9 +20,10 @@ import sys, getopt, os try: - import avahi, gobject, dbus + from gi.repository import GObject + import avahi, dbus 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 Avahi and python-dbus.") sys.exit(1) try: @@ -95,7 +96,7 @@ class AvahiBookmarks: else: t += '