upower: properly add signal receiver

This commit is contained in:
Peter F. Patel-Schneider 2020-02-22 07:49:45 -05:00
parent 23c0397764
commit 955df30c7f
1 changed files with 3 additions and 3 deletions

View File

@ -58,8 +58,8 @@ try:
_UPOWER_BUS = 'org.freedesktop.UPower'
_UPOWER_INTERFACE = 'org.freedesktop.UPower'
_LOGIND_BUS = 'org.freedesktop.login1.Manager'
_LOGIND_INTERFACE = 'org.freedesktop.login1'
_LOGIND_BUS = 'org.freedesktop.login1'
_LOGIND_INTERFACE = 'org.freedesktop.login1.Manager'
# integration into the main GLib loop
from dbus.mainloop.glib import DBusGMainLoop
@ -75,7 +75,7 @@ try:
dbus_interface=_UPOWER_INTERFACE, bus_name=_UPOWER_BUS)
bus.add_signal_receiver(_suspend_or_resume,'PrepareForSleep',
_LOGIND_BUS, _LOGIND_INTERFACE)
dbus_interface=_LOGIND_INTERFACE, bus_name=_LOGIND_BUS)
if _log.isEnabledFor(_INFO):
_log.info("connected to system dbus, watching for suspend/resume events")