[gnome-lirc-properties] Add more debug when dropping devices



commit e602fa1f888d3c573d09551bb4ea797ca1669439
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 17 18:23:09 2010 +0100

    Add more debug when dropping devices
    
    When detecting devices, print out more information if the
    device will not be added to the list of receivers.

 gnome_lirc_properties/hardware.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gnome_lirc_properties/hardware.py b/gnome_lirc_properties/hardware.py
index 1adc0b5..10d0f50 100644
--- a/gnome_lirc_properties/hardware.py
+++ b/gnome_lirc_properties/hardware.py
@@ -393,6 +393,7 @@ class HardwareManager(gobject.GObject):
         '''Find IR receivers connected via USB bus.'''
 
         for udi in usb_devices:
+            logging.info('checking device %s', udi)
             # provide cancelation point:
             if self.__search_canceled:
                 break
@@ -411,6 +412,7 @@ class HardwareManager(gobject.GObject):
 
             # skip USB devices that do not get sufficient power:
             if vendor_id is None or product_id is None:
+                logging.info('No vendor ID or product ID')
                 continue
 
             # report search progress:
@@ -420,6 +422,7 @@ class HardwareManager(gobject.GObject):
             # Skip devices without vendor id. Linux for instance
             # doesn't assign a vendor id to USB host controllers.
             if not vendor_id:
+                logging.info('No vendor ID')
                 continue
 
             # The Streamzap really has a product ID of 0000,
@@ -435,12 +438,14 @@ class HardwareManager(gobject.GObject):
 
             # skip unknown hardware:
             if not receiver:
+                logging.info('Could not find matching receiver')
                 continue
 
             # skip devices, where the associated kernel module
             # doesn't match the expected kernel module:
             if (receiver.kernel_module and
                 not device.check_kernel_module(receiver.kernel_module)):
+                logging.info('Kernel module is not %s', receiver.kernel_module)
                 continue
 
             # find the LIRC device node, and signal search result:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]