From 5b812400ab734672b8f06e8e883c138c6115a576 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Mon, 15 Jun 2026 17:24:59 -0500 Subject: [PATCH] Gracefully provide an error if JSON tailoring doesn't exist Fixes #2369 --- utils/autotailor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/autotailor b/utils/autotailor index 9d5b1a17bb..bccd5bbc37 100755 --- a/utils/autotailor +++ b/utils/autotailor @@ -529,6 +529,9 @@ class Tailoring: f.write(pretty_xml) def import_json_tailoring(self, json_tailoring): + json_tailoring_path = pathlib.Path(json_tailoring).absolute() + if not json_tailoring_path.is_file(): + raise ValueError(f'JSON tailoring file "{json_tailoring}" does not exist or is not a file.') with open(json_tailoring, "r") as jf: tailoring_dict = json.load(jf)