Skip to content

Commit a5de193

Browse files
Improve chromeos config parsing
1 parent 51a327f commit a5de193

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/inputstreamhelper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ def _parse_chromeos_recovery_conf(self):
292292
download_dict = {}
293293
self._url = config.CHROMEOS_RECOVERY_CONF
294294
conf = self._http_request().split('\n\n')
295-
for device in conf:
296-
if config.CHROMEOS_ARM_HWID in device:
295+
devices = [x for x in conf if 'name=' in x]
296+
for device in devices:
297+
if config.CHROMEOS_ARM_HWID in device.split('\nhwidmatch=')[1].split('\n')[0]:
297298
for line in device.splitlines():
298299
if 'url' in line:
299300
download_dict['url'] = line.split('url=')[1]

0 commit comments

Comments
 (0)