Dne 13.4.2011 16:26, Sandro "red" Mathys napsal(a):
2011/4/13 Miroslav Suchý<[email protected]>:
On 04/13/2011 02:52 PM, Sandro "red" Mathys wrote:
2011/4/13 Miroslav Suchý<[email protected]>:
It is some USB device. Can you run this python script in both %post
section of kickstart and after normal reboot? Check the diferences.
You should look for records with
XXX: None

Lots of XXX: None found, actually it's always None!

That is strange... aha, there is typo. It should be PRODUCT and not product.
Commited as ebd9948a92945026db88932eefd23c4c0c7738ea

Next issue: ~4 lines later, "usb" is not defined:
<type 'exceptions.UnboundLocalError'>: local variable 'usb' referenced
before assignment

If I add "usb = USB()" (as found in the first part of that
if-elif-else construct) before that line, I get the next traceback:
[Wed Apr 13 15:18:51 2011] up2date
Traceback (most recent call last):
   File "/usr/sbin/rhnreg_ks", line 213, in<module>
     cli.run()
   File "/usr/share/rhn/up2date_client/rhncli.py", line 74, in run
     sys.exit(self.main() or 0)
   File "/usr/sbin/rhnreg_ks", line 101, in main
     hardwareList = hardware.Hardware()
   File "/usr/share/rhn/up2date_client/hardware.py", line 674, in Hardware
     allhw = get_devices()
   File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 45, in
get_devices
     'desc':     _get_device_desc(device),
   File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 311, in
_get_device_desc
     result = "%s|%s" % (usb.get_vendor(vendor_id),
usb.get_device(vendor_id, device.get_property('ID_MODEL_ID')))
   File "/usr/lib/python2.7/site-packages/hwdata.py", line 82, in get_device
     device = device.lower()
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'lower'


That is strange. Sandro, can you run this for me:
>>> import gudev
>>> import glib
>>> def print_device(device):
...     print "subsystem", device.get_subsystem()
...     print "devtype", device.get_devtype()
...     print "name", device.get_name()
...     print "number", device.get_number()
...     print "sysfs_path:", device.get_sysfs_path()
...     print "driver:", device.get_driver()
...     print "action:", device.get_action()
...     print "seqnum:", device.get_seqnum()
...     print "device type:", device.get_device_type()
...     print "device number:", device.get_device_number()
...     print "device file:", device.get_device_file()
... print "device file symlinks:", ", ".join(device.get_device_file_symlinks())
...     for k in device.get_property_keys():
...        print "  %s = %s" % (k , device.get_property(k))
...
>>> client = gudev.Client(["usb"])
>>> devices = client.query_by_subsystem("usb")
>>> for device in devices:
...     print_device(device)

Your traceback means that you have some device which has no ID_MODEL_ID. I can get this data from PRODUCT, but I'm really curious which device do not have ID_MODEL_ID. Only usb_interfaces do not have it AFAIK, but they are filtered few lines above...

Mirek

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to