Skip to content

Commit 8cc793d

Browse files
committed
..
1 parent 3b78367 commit 8cc793d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

petab/petablint.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,18 @@ def main():
160160
try:
161161
validate(args.yaml_file_name)
162162
except SchemaValidationError as e:
163+
path = ""
163164
if e.absolute_path:
164165
# construct a path to the error location inside the YAML file
165166
path = list(e.absolute_path)
166167
path = (
167-
path[0] + "".join(f"[{str(p)}]" for p in path[1:]) + ": "
168+
f" at {path[0]}"
169+
+ "".join(f"[{str(p)}]" for p in path[1:])
170+
+ ": "
168171
)
169-
else:
170-
path = ""
171172
logger.error(
172-
"Provided YAML file does not adhere to PEtab schema: "
173-
f"{path}{e.args[0]}"
173+
"Provided YAML file does not adhere to the PEtab schema"
174+
f"{path}: {e.args[0]}"
174175
)
175176
sys.exit(1)
176177
except ValueError as e:

0 commit comments

Comments
 (0)