This branch modifies the implementation of the property BaseDevice.has_reliable_data in the script l/c/l/scipts/hwdbsubmissions.py so that is works as expected for submissions with udev data.
BaseDevice.has_reliable_data is used to determine if the data of a device node is "complete enough" to be stored in our database, ḿeaning that the node provides a bus as enumerated by HWBus, a vendor ID, a product ID and a product name.
The root device of a submissions is again a bit messy: For udev submissions, its raw_bus value is "acpi", while it is either None or "unknown" in submissions with HAL data. Hence I had to change "bus == 'unknown' ..." to "if bus in ('unknown', 'acpi')...". ('acpi' is not used as a value of raw_bus for submissions with HAL data.)
A log message is recorded, if the device soes not provide all required value. The format string of the message expanded the value self.udi, which exists only in class HALDevice, so I changed that to self.device_id.
The tests of the property are quite straightforward, I think.
This branch modifies the implementation of the property BaseDevice. has_reliable_ data in the script l/c/l/scipts/ hwdbsubmissions .py so that is works as expected for submissions with udev data.
BaseDevice. has_reliable_ data is used to determine if the data of a device node is "complete enough" to be stored in our database, ḿeaning that the node provides a bus as enumerated by HWBus, a vendor ID, a product ID and a product name.
The root device of a submissions is again a bit messy: For udev submissions, its raw_bus value is "acpi", while it is either None or "unknown" in submissions with HAL data. Hence I had to change "bus == 'unknown' ..." to "if bus in ('unknown', 'acpi')...". ('acpi' is not used as a value of raw_bus for submissions with HAL data.)
A log message is recorded, if the device soes not provide all required value. The format string of the message expanded the value self.udi, which exists only in class HALDevice, so I changed that to self.device_id.
The tests of the property are quite straightforward, I think.