Merge ~sylvain-pineau/checkbox-support:udevadm_export_list_only into checkbox-support:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 5a311080d91ca75dc72cbca471dca807b0723ed3
Merged at revision: 4adef42051dd0f90b0f09c889de67ea8e0337cba
Proposed branch: ~sylvain-pineau/checkbox-support:udevadm_export_list_only
Merge into: checkbox-support:master
Diff against target: 30 lines (+3/-3)
2 files modified
checkbox_support/parsers/tests/test_udevadm.py (+1/-1)
checkbox_support/parsers/udevadm.py (+2/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+321660@code.launchpad.net

Description of the change

little patch to allow the new tarball submission format to contain a json export based on dicts (and not a dict of list of dict...)

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

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_support/parsers/tests/test_udevadm.py b/checkbox_support/parsers/tests/test_udevadm.py
index 4764aa2..7303181 100644
--- a/checkbox_support/parsers/tests/test_udevadm.py
+++ b/checkbox_support/parsers/tests/test_udevadm.py
@@ -93,7 +93,7 @@ class TestUdevadmParser(TestCase, UdevadmDataMixIn):
93 if with_lsblk:93 if with_lsblk:
94 lsblk = self.get_lsblk(name)94 lsblk = self.get_lsblk(name)
95 return parse_udevadm_output(95 return parse_udevadm_output(
96 self.get_text(name), lsblk, 64)["devices"]96 self.get_text(name), lsblk, 64)
9797
98 def count(self, devices, category):98 def count(self, devices, category):
99 return len([d for d in devices if d.category == category])99 return len([d for d in devices if d.category == category])
diff --git a/checkbox_support/parsers/udevadm.py b/checkbox_support/parsers/udevadm.py
index 3954252..953a4f6 100644
--- a/checkbox_support/parsers/udevadm.py
+++ b/checkbox_support/parsers/udevadm.py
@@ -1117,10 +1117,10 @@ def known_to_be_video_device(vendor_id, product_id, pci_class, pci_subclass):
11171117
1118class UdevResult(object):1118class UdevResult(object):
1119 def __init__(self):1119 def __init__(self):
1120 self.devices = {"devices": []}1120 self.devices = []
11211121
1122 def addDevice(self, device):1122 def addDevice(self, device):
1123 self.devices["devices"].append(device)1123 self.devices.append(device)
11241124
11251125
1126def parse_udevadm_output(output, lsblk=None, bits=None):1126def parse_udevadm_output(output, lsblk=None, bits=None):

Subscribers

People subscribed via source and target branches