diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/interface-locking-test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/interface-locking-test.py b/examples/interface-locking-test.py index a31a4be2..3b98cd1f 100755 --- a/examples/interface-locking-test.py +++ b/examples/interface-locking-test.py @@ -12,7 +12,14 @@ manager = dbus.Interface(bus.get_object("org.freedesktop.Hal", "/org/freedesktop/Hal/Manager"), "org.freedesktop.Hal.Manager") +# replace this with a volume on your system +device = dbus.Interface(bus.get_object("org.freedesktop.Hal", + "/org/freedesktop/Hal/devices/volume_uuid_2232_1F11"), + "org.freedesktop.Hal.Device") + manager.AcquireGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage", True) -time.sleep(10) +#device.AcquireInterfaceLock("org.freedesktop.Hal.Device.Volume", True) +time.sleep(2) manager.ReleaseGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage") +#device.ReleaseInterfaceLock("org.freedesktop.Hal.Device.Volume") |