Code review comment for lp:~adeuring/launchpad/hwdb-udev-submissions-noise-reduction-2

Revision history for this message
Abel Deuring (adeuring) wrote :

This branch adds a several bus names to the sets of names known in class BaseDevice which

- are used for udev nodes that do not describe real, physical devices but only "aspects" or real devices, or
- are used for "virtual" devices, i.e., for artefacts of the Linux kernel.

Background: The HWDB submission processing script represents devices as described by udev or HAL as instances of class UdevDevice or class HALDevice. These classes have methods to populate HWDB tables with data from a submission; these methods need to know (a) if a given instance describes a real device or only an "aspect" of a real device (property BaseDevice.is_real_device) and (b) if a device provides enough data and if a device is "interesting enough" to be stored in the HWDB (property BaseDevice.has_reliable_data).

Both properties use tuples of bus names to decide, how a device with a given bus name should be treated. Since Karmic was released, we received a considerable number of submissions which contain udev devicea that fall in one of the categories described above, but which were not yet listed in the tuples of "known to be unterinteresting" bus names. This branch adds these bus names.

test: ./bin/test -t test_hwdb_submission_processing

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/scripts/hwdbsubmissions.py
  lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py

== Pyflakes notices ==

lib/canonical/launchpad/scripts/hwdbsubmissions.py
    22: redefinition of unused 'etree' from line 20

== Pylint notices ==

lib/canonical/launchpad/scripts/hwdbsubmissions.py
    20: [F0401] Unable to import 'xml.etree.cElementTree' (No module named etree)

lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py
    2118: [E0601, TestHWDBSubmissionProcessing.testHasReliableDataForInsuffientData] Using variable 'test_device' before assignment

The etree messages are not related to my changes.

The message E0601 indicates either that I'm becoming senile (can't see anything wrong there: test_device is defined in line 2117) or that pylint is on crack. Also, the affected method is not changed.

« Back to merge proposal