diff options
Diffstat (limited to 'tools/rbf0_encode.py')
| -rw-r--r-- | tools/rbf0_encode.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/rbf0_encode.py b/tools/rbf0_encode.py index 2cf46a68e..8c8818612 100644 --- a/tools/rbf0_encode.py +++ b/tools/rbf0_encode.py | |||
| @@ -227,7 +227,7 @@ def write_all(report, out_dir): | |||
| 227 | try: | 227 | try: |
| 228 | with open(report, encoding="utf-8") as f: | 228 | with open(report, encoding="utf-8") as f: |
| 229 | data = json.load(f) | 229 | data = json.load(f) |
| 230 | except (OSError, json.JSONDecodeError) as e: | 230 | except (OSError, ValueError) as e: # ValueError: bad JSON or non-UTF-8 bytes |
| 231 | raise SystemExit(f"{report}: cannot read report: {e}") from None | 231 | raise SystemExit(f"{report}: cannot read report: {e}") from None |
| 232 | if not isinstance(data, dict) or data.get("tool") != "rbf0_tree": | 232 | if not isinstance(data, dict) or data.get("tool") != "rbf0_tree": |
| 233 | raise SystemExit(f"{report}: not an rbf0_tree.py JSON report") | 233 | raise SystemExit(f"{report}: not an rbf0_tree.py JSON report") |