summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/connman-notify/files/connman-notify-py3-support.patch')
-rw-r--r--net-misc/connman-notify/files/connman-notify-py3-support.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/net-misc/connman-notify/files/connman-notify-py3-support.patch b/net-misc/connman-notify/files/connman-notify-py3-support.patch
new file mode 100644
index 00000000000..59c88849556
--- /dev/null
+++ b/net-misc/connman-notify/files/connman-notify-py3-support.patch
@@ -0,0 +1,38 @@
+--- a/connman-notify
++++ b/connman-notify
+@@ -7,8 +7,8 @@
+ import argparse
+ import dbus
+ import dbus.mainloop.glib
+-import glib
+-import pynotify
++from gi.repository import GLib
++from gi.repository import Notify
+
+ APP_NAME = 'connman'
+ SHORT_DEV = True
+@@ -22,7 +22,7 @@
+
+
+ def notify(subject, body):
+- ntf = pynotify.Notification(subject, body)
++ ntf = Notify.Notification.new(subject, body)
+ ntf.show()
+
+
+@@ -79,7 +79,7 @@
+ if args.hide_addr: SHOW_ADDR = False
+
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+- pynotify.init(APP_NAME)
++ Notify.init(APP_NAME)
+ bus = dbus.SystemBus()
+ manager = dbus.Interface(bus.get_object("net.connman", "/"), "net.connman.Manager")
+
+@@ -88,5 +88,5 @@
+ signal_name="PropertyChanged",
+ path_keyword="path")
+
+- mainloop = glib.MainLoop()
++ mainloop = GLib.MainLoop()
+ mainloop.run()