mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
resulttool/resultutils: allow index generation despite corrupt json
non-release indexes will continue to generate when test output is corrupted. (From OE-Core rev: 1a9157684a6bff8406c9bb470cb2e16ee006bbe9) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6f510702e3
commit
312a2a68fd
@@ -58,7 +58,11 @@ def append_resultsdata(results, f, configmap=store_map, configvars=extra_configv
|
|||||||
testseries = posixpath.basename(posixpath.dirname(url.path))
|
testseries = posixpath.basename(posixpath.dirname(url.path))
|
||||||
else:
|
else:
|
||||||
with open(f, "r") as filedata:
|
with open(f, "r") as filedata:
|
||||||
data = json.load(filedata)
|
try:
|
||||||
|
data = json.load(filedata)
|
||||||
|
except json.decoder.JSONDecodeError:
|
||||||
|
print("Cannot decode {}. Possible corruption. Skipping.".format(f))
|
||||||
|
data = ""
|
||||||
testseries = os.path.basename(os.path.dirname(f))
|
testseries = os.path.basename(os.path.dirname(f))
|
||||||
else:
|
else:
|
||||||
data = f
|
data = f
|
||||||
|
|||||||
Reference in New Issue
Block a user