diff options
author | David Zeuthen <davidz@redhat.com> | 2007-03-27 01:35:49 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2007-03-27 01:35:49 -0400 |
commit | 583de1e89c8043180814921c860f85c4cd9ed58b (patch) | |
tree | fda549e85bbfb92f03e8137a670612e3869d3c04 /examples/interface-locking-test.py | |
parent | 6c4e1b748beba80a564262c9b877803833b851aa (diff) |
fix up ReleaseGlobalInterfaceLock() and improve locking example
Diffstat (limited to 'examples/interface-locking-test.py')
-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") |