Merge lp:~sylvain-pineau/checkbox/fix-1559189 into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4289
Merged at revision: 4289
Proposed branch: lp:~sylvain-pineau/checkbox/fix-1559189
Merge into: lp:checkbox
Diff against target: 30 lines (+6/-2)
1 file modified
checkbox-support/checkbox_support/parsers/udevadm.py (+6/-2)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix-1559189
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+290338@code.launchpad.net

Description of the change

Fixes the linked bug

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved after validating both udevadm output provided in the bug report.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-support/checkbox_support/parsers/udevadm.py'
--- checkbox-support/checkbox_support/parsers/udevadm.py 2016-02-17 16:40:50 +0000
+++ checkbox-support/checkbox_support/parsers/udevadm.py 2016-03-29 16:52:20 +0000
@@ -633,12 +633,16 @@
633 elif (self._environment.get("DEVTYPE") == "disk" and633 elif (self._environment.get("DEVTYPE") == "disk" and
634 "ID_MODEL_ENC" in self._environment):634 "ID_MODEL_ENC" in self._environment):
635 return decode_id(self._environment["ID_MODEL_ENC"])635 return decode_id(self._environment["ID_MODEL_ENC"])
636 if self.driver == "nvme" and self.bus == 'pci' and self._stack:636 elif self.driver == "nvme" and self.bus == 'pci' and self._stack:
637 parent = self._stack[-1]637 parent = self._stack[-1]
638 if parent.product:638 if parent.product:
639 return parent.product639 return parent.product
640 else:640 else:
641 return self.name641 return self.name
642 elif (
643 self._environment.get("DEVTYPE") == "disk" and
644 self.driver == 'virtio_blk' and self.bus == 'virtio'):
645 return self.name
642646
643 # floppy647 # floppy
644 if self.driver == "floppy":648 if self.driver == "floppy":
@@ -810,7 +814,7 @@
810 device._mmc_type == 'MMC'):814 device._mmc_type == 'MMC'):
811 return False815 return False
812 # Do not ignore QEMU/KVM virtio disks816 # Do not ignore QEMU/KVM virtio disks
813 if ("ID_PART_TABLE_TYPE" in device._environment and817 if ("DEVTYPE" in device._environment and
814 device.bus == "virtio" and818 device.bus == "virtio" and
815 device.driver == "virtio_blk"):819 device.driver == "virtio_blk"):
816 return False820 return False

Subscribers

People subscribed via source and target branches