1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-12 07:58:07 +00:00

read_tree_values: more robust parsing.

Skip entries not containing a ":".
This commit is contained in:
Sergei Trofimov 2017-10-06 13:37:00 +01:00
parent 98e19ae048
commit 7e073c1fce

View File

@ -620,7 +620,7 @@ class Target(object):
check_exit_code=check_exit_code) check_exit_code=check_exit_code)
result = {} result = {}
for entry in output.strip().split('\n'): for entry in output.strip().split('\n'):
if not entry.strip(): if ':' not in entry:
continue continue
path, value = entry.strip().split(':', 1) path, value = entry.strip().split(':', 1)
result[path] = value result[path] = value