Browse Source

tools/pamusb-conf: Added SDCard support

master
Contarino Rosario 13 years ago
parent
commit
3de1d840e4
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      tools/pamusb-conf

+ 3
- 1
tools/pamusb-conf View File

@ -28,7 +28,9 @@ class Device:
udi) udi)
deviceProperties = dbus.Interface(deviceObj, dbus.PROPERTIES_IFACE) deviceProperties = dbus.Interface(deviceObj, dbus.PROPERTIES_IFACE)
if deviceProperties.Get('org.freedesktop.UDisks.Device', 'DeviceIsRemovable') != 1: if deviceProperties.Get('org.freedesktop.UDisks.Device', 'DeviceIsRemovable') != 1:
raise Exception, 'Not a removable device'
# Workaround for removable devices with fixed media (such as SD cards)
if not "mmcblk" in udi:
raise Exception, 'Not a removable device'
self.vendor = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveVendor') self.vendor = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveVendor')
self.product = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveModel') self.product = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveModel')
self.serialNumber = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveSerial') self.serialNumber = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveSerial')


Loading…
Cancel
Save