From cddd20098bbacd3f778d5883c59f6d7c86080285 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 19 Jul 2007 21:29:28 +0000 Subject: [PATCH] improved verbosity --- tools/pamusb-conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/pamusb-conf b/tools/pamusb-conf index 1145ee6..3477c09 100755 --- a/tools/pamusb-conf +++ b/tools/pamusb-conf @@ -32,7 +32,7 @@ class Device: self.product = deviceProperties['info.product'] self.serialNumber = deviceProperties['usb_device.serial'] if len(self.volumes()) < 1: - raise Exception, '%s does not contain any volume' % self.__udi + raise Exception, 'Device does not contain any volume' def __isChildOfDevice(self, udi): obj = bus.get_object('org.freedesktop.Hal', udi) @@ -153,11 +153,15 @@ def addDevice(options): for udi in halManager.FindDeviceStringMatch('info.bus', 'usb_device'): try: + if options['verbose']: + print 'Inspecting %s' % udi devices.append(Device(udi)) except Exception, ex: if options['verbose']: - print ex + print "\tInvalid: %s" % ex pass + else: + print "\tValid" if len(devices) == 0: print 'No devices detected.'