diff options
Diffstat (limited to 'scripts/lib/resulttool/resultutils.py')
-rw-r--r-- | scripts/lib/resulttool/resultutils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index 8917022d36..c5521d81bd 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py | |||
@@ -58,7 +58,11 @@ def append_resultsdata(results, f, configmap=store_map, configvars=extra_configv | |||
58 | testseries = posixpath.basename(posixpath.dirname(url.path)) | 58 | testseries = posixpath.basename(posixpath.dirname(url.path)) |
59 | else: | 59 | else: |
60 | with open(f, "r") as filedata: | 60 | with open(f, "r") as filedata: |
61 | data = json.load(filedata) | 61 | try: |
62 | data = json.load(filedata) | ||
63 | except json.decoder.JSONDecodeError: | ||
64 | print("Cannot decode {}. Possible corruption. Skipping.".format(f)) | ||
65 | data = "" | ||
62 | testseries = os.path.basename(os.path.dirname(f)) | 66 | testseries = os.path.basename(os.path.dirname(f)) |
63 | else: | 67 | else: |
64 | data = f | 68 | data = f |
@@ -142,7 +146,7 @@ def generic_get_log(sectionname, results, section): | |||
142 | return decode_log(ptest['log']) | 146 | return decode_log(ptest['log']) |
143 | 147 | ||
144 | def ptestresult_get_log(results, section): | 148 | def ptestresult_get_log(results, section): |
145 | return generic_get_log('ptestresuls.sections', results, section) | 149 | return generic_get_log('ptestresult.sections', results, section) |
146 | 150 | ||
147 | def generic_get_rawlogs(sectname, results): | 151 | def generic_get_rawlogs(sectname, results): |
148 | if sectname not in results: | 152 | if sectname not in results: |