Fix launching powerprofilesctl

The active profile is on org.freedesktop.DBus.Properties

Fixes: 3b29b0e ("cleanup: Use UPower namespace as default DBus name preserving old one")
This commit is contained in:
Mario Limonciello 2024-02-13 16:11:44 -06:00
parent 32f5abfb82
commit c749dfc444

View file

@ -10,6 +10,7 @@ VERSION = '@VERSION@'
PP_NAME = 'org.freedesktop.UPower.PowerProfiles'
PP_PATH = '/org/freedesktop/UPower/PowerProfiles'
PP_IFACE = 'org.freedesktop.UPower.PowerProfiles'
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties'
def usage_main():
print('Usage:')
@ -98,7 +99,7 @@ def get_proxy():
try:
bus = Gio.bus_get_sync(Gio.BusType.SYSTEM, None)
proxy = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
PP_NAME, PP_PATH, PP_IFACE, None)
PP_NAME, PP_PATH, PROPERTIES_IFACE, None)
except:
raise
return proxy