Search in both the parent and the originating_device.

This commit is contained in:
Guido Falsi 2016-03-29 11:22:34 +02:00
parent 2c17492ad1
commit c4ada0f159

View File

@ -700,7 +700,7 @@ class Device(DeviceConfig, DevicePlugin):
d.product == objif.GetProperty('usb.product') and \
d.serial == objif.GetProperty('usb.serial'):
midpath = manager.FindDeviceStringMatch('info.parent', path)
dpaths = manager.FindDeviceStringMatch('storage.originating_device', midpath[0])
dpaths = manager.FindDeviceStringMatch('storage.originating_device', path) + manager.FindDeviceStringMatch('storage.originating_device', midpath[0])
for dpath in dpaths:
# devif = dbus.Interface(bus.get_object('org.freedesktop.Hal', dpath), 'org.freedesktop.Hal.Device')
try: