1
0
mirror of https://github.com/openSUSE/snapper.git synced 2026-02-06 18:46:06 +01:00
Files
snapper/examples/python/get-config.py

17 lines
337 B
Python
Raw Permalink Normal View History

2023-03-28 15:00:27 +02:00
#!/usr/bin/python3
2012-05-23 16:38:38 +02:00
import dbus
bus = dbus.SystemBus()
2012-07-24 10:19:52 +02:00
snapper = dbus.Interface(bus.get_object('org.opensuse.Snapper', '/org/opensuse/Snapper'),
dbus_interface='org.opensuse.Snapper')
2012-05-23 16:38:38 +02:00
config = snapper.GetConfig("root")
2023-03-28 15:00:27 +02:00
print(config[0], config[1])
2012-07-05 12:43:48 +02:00
for k, v in config[2].items():
2023-03-28 15:00:27 +02:00
print("%s=%s" % (k, v))