Message ID | 31b996c01c72749fc62821a3c9d1da70540bfad6.1694526588.git.steve@sakoman.com |
---|---|
State | Accepted, archived |
Commit | 31b996c01c72749fc62821a3c9d1da70540bfad6 |
Headers | show |
Series | [dunfell,01/14] bind: Backport fix for CVE-2023-2828 | expand |
diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index 7666331ba2..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 testseries = posixpath.basename(posixpath.dirname(url.path)) else: 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)) else: data = f