mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
dbusmock/fprintd: Add ability to remove devices
This commit is contained in:
@ -146,6 +146,19 @@ def AddDevice(self, device_name, num_enroll_stages, scan_type):
|
|||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
@dbus.service.method(MANAGER_MOCK_IFACE,
|
||||||
|
in_signature='o')
|
||||||
|
def RemoveDevice(self, path):
|
||||||
|
# This isn't compatible with hotplugging devices, which fprintd doesn't
|
||||||
|
# support yet, but it's meant to remove devices added to the mock for
|
||||||
|
# testing purposes.
|
||||||
|
if not path:
|
||||||
|
raise dbus.exceptions.DBusException(
|
||||||
|
'Invalid empty path.',
|
||||||
|
name='org.freedesktop.DBus.Error.InvalidArgs')
|
||||||
|
|
||||||
|
self.RemoveObject(path)
|
||||||
|
|
||||||
@dbus.service.method(DEVICE_IFACE,
|
@dbus.service.method(DEVICE_IFACE,
|
||||||
in_signature='s', out_signature='as')
|
in_signature='s', out_signature='as')
|
||||||
def ListEnrolledFingers(device, user):
|
def ListEnrolledFingers(device, user):
|
||||||
|
|||||||
Reference in New Issue
Block a user