Skip to content

Commit b3409c0

Browse files
committed
[section.py] Change Validation Error Messages Print
1 parent 76a1c4f commit b3409c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

odml/section.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def __init__(self, name=None, type=None, parent=None,
8383
self.parent = parent
8484

8585
for err in validation.Validation(self).errors:
86-
if err.rank == "error":
87-
print("ERROR", err.obj, err.msg)
86+
if err.is_error:
87+
msg = "\n\t- %s %s: %s" % (err.obj, err.rank, err.msg)
88+
print(msg)
8889

8990
def __repr__(self):
9091
return "Section[%d|%d] {name = %s, type = %s, id = %s}" % (len(self._sections),

0 commit comments

Comments
 (0)