From 9aebd6291c9e005f5735866f65e144953f963d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Sun, 4 Jun 2023 01:15:41 +0200 Subject: [PATCH] fix notifications --- files/usr/local/bin/mkbackup-btrfs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/files/usr/local/bin/mkbackup-btrfs b/files/usr/local/bin/mkbackup-btrfs index 509bd92..c370e44 100755 --- a/files/usr/local/bin/mkbackup-btrfs +++ b/files/usr/local/bin/mkbackup-btrfs @@ -48,13 +48,9 @@ from mkbackup.mkbackup_btrfs_config import __version__ as confversion __author__ = "Jakobus Schürz " __version__ = "1.01.0" -class EmDBUSDesktop(EM): - def __init__(self): - super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced') - class Notification(Emitter): def __init__(self): - super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced/Notification') + super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced') class EmDBUS(EM): """ Example to use @@ -2017,7 +2013,7 @@ Author: %s""" % (confversion,__version__,__author__)) args.mdb = EmDBUS() args.mdb.reset(args.tag) args.mdb.start(args.tag) - args.mdbd = EmDBUSDesktop() + args.mdbd = Notification() # msg = dict() # msg['sender'] = "mkbackup" # msg['header'] = "%s-backup" % (args.tag) @@ -2142,8 +2138,6 @@ um %s Uhr abgeschlossen. # msg['action']['action1']['loc'] = 'file:~/backup' - advnotify = Notification() - advnotify.normal(msg) args.mdbd.critical(msg) elif args.notification == None: logger.critical("No notification at all")