Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions utils/autotailor
Original file line number Diff line number Diff line change
Expand Up @@ -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("JSON Tailoring file does not exist or is not a file.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the file name to the error message.

with open(json_tailoring, "r") as jf:
tailoring_dict = json.load(jf)

Expand Down
Loading