summaryrefslogtreecommitdiffstats
path: root/pystatemgr/discover_system_state.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystatemgr/discover_system_state.py')
-rw-r--r--pystatemgr/discover_system_state.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pystatemgr/discover_system_state.py b/pystatemgr/discover_system_state.py
index cc2ae10..9324eba 100644
--- a/pystatemgr/discover_system_state.py
+++ b/pystatemgr/discover_system_state.py
@@ -69,12 +69,14 @@ def getProperty(bus, objs, key, prop):
intf = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
return intf.Get(objs[key]['interface_name'], prop)
+
def setProperty(bus, objs, key, prop, prop_value):
obj = bus.get_object(
objs[key]['bus_name'], objs[key]['object_name'])
intf = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
return intf.Set(objs[key]['interface_name'], prop, prop_value)
+
bus = dbus.SystemBus()
pgood = getProperty(bus, dbus_objects, 'power', 'pgood')
OpenPOWER on IntegriCloud