Skip to content

Commit 83c03ed

Browse files
committed
Fix for select_best_chromeos_image.
Until now, select_best_chromeos_image actually only used less than half of the hwids in the list, since many don't have that space after the name.
1 parent 328e70e commit 83c03ed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/inputstreamhelper/widevine/arm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ def select_best_chromeos_image(devices):
1616
"""Finds the newest and smallest of the ChromeOS images given"""
1717
log(0, 'Find best ARM image to use from the Chrome OS recovery.json')
1818

19+
arm_hwids = [h for arm_hwid in config.CHROMEOS_RECOVERY_ARM_HWIDS
20+
for h in ['^{} '.format(arm_hwid), '^{}-.*'.format(arm_hwid), '^{}.*'.format(arm_hwid)]]
1921
best = None
2022
for device in devices:
2123
# Select ARM hardware only
22-
for arm_hwid in config.CHROMEOS_RECOVERY_ARM_HWIDS:
23-
if '^{0} '.format(arm_hwid) in device['hwidmatch']:
24+
for arm_hwid in arm_hwids:
25+
if arm_hwid in device['hwidmatch']:
2426
hwid = arm_hwid
2527
break # We found an ARM device, rejoice !
2628
else:

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ deps =
1414
[flake8]
1515
builtins = func
1616
max-line-length = 160
17-
ignore = E129,FI13,FI50,FI51,FI53,FI54,W503
17+
ignore = E127,E129,FI13,FI50,FI51,FI53,FI54,W503
1818
require-code = True
1919
min-version = 2.7
2020
exclude = .tox,experiment

0 commit comments

Comments
 (0)