Skip to content

Commit

Permalink
pamusb-conf cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aluzzardi committed Apr 21, 2011
1 parent c92b0f7 commit cf7f7d9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/pamusb-conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ class Device:
self.__udi = udi
deviceObj = bus.get_object('org.freedesktop.UDisks',
udi)
#deviceProperties = deviceObj.getProperties()
#dbus_interface = 'org.freedesktop.UDisks.Device')
deviceProperties = dbus.Interface(deviceObj, dbus.PROPERTIES_IFACE)
if deviceProperties.Get('org.freedesktop.UDisks.Device', 'DeviceIsRemovable') != 1:
raise Exception, 'Not a removable device'
self.vendor = None
self.product = None
self.vendor = deviceProperties.Get('org.freedesktop.UDisks.Device', 'DriveVendor')
self.model = 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')
if len(self.volumes()) < 1:
raise Exception, 'Device does not contain any volume'
Expand Down Expand Up @@ -159,7 +155,7 @@ def addDevice(options):
print "\tValid"

if len(devices) == 0:
print 'No devices detected.'
print 'No devices detected. Try running in verbose (-v) mode to see what\'s going on.'
sys.exit()
device = devices[listOptions("Please select the device you wish to add.", devices)]

Expand Down

0 comments on commit cf7f7d9

Please sign in to comment.