Browse Source

Bugfix:

* Indentation error made detection of multiple volumes impossible
* Unexpected behaviour happened when a device without volume was detected
master
Andrea Luzzardi 17 years ago
parent
commit
d93be05b1b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      pam_usb/tools/pamusb-conf

+ 3
- 1
pam_usb/tools/pamusb-conf View File

@ -32,6 +32,8 @@ class Device:
self.vendor = deviceProperties['usb_device.vendor'] self.vendor = deviceProperties['usb_device.vendor']
self.product = deviceProperties['info.product'] self.product = deviceProperties['info.product']
self.serialNumber = deviceProperties['usb_device.serial'] self.serialNumber = deviceProperties['usb_device.serial']
if len(self.volumes()) < 1:
raise Exception, '%s does not contain any volume' % self.__udi
def __isChildOfDevice(self, udi): def __isChildOfDevice(self, udi):
obj = bus.get_object('org.freedesktop.Hal', udi) obj = bus.get_object('org.freedesktop.Hal', udi)
@ -66,7 +68,7 @@ class Device:
continue continue
vols.append({'uuid' : deviceProperties['volume.uuid'], vols.append({'uuid' : deviceProperties['volume.uuid'],
'device' : deviceProperties['block.device']}) 'device' : deviceProperties['block.device']})
return vols
return vols
def listOptions(question, options, autodetect = True): def listOptions(question, options, autodetect = True):
if autodetect == True and len(options) == 1: if autodetect == True and len(options) == 1:


Loading…
Cancel
Save