Skip to content

Commit af89a94

Browse files
Ghesselinkaothms
authored andcommitted
json dump multiple errors
1 parent f963b97 commit af89a94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def main():
2626
if not args.json:
2727
print(exc, file=sys.stderr)
2828
else:
29-
json.dump(exc.asdict(), sys.stdout)
29+
json.dump([e.asdict() for e in getattr(exc, "errors", [exc])], sys.stdout, indent=2)
3030
exit(1)
3131

3232
if __name__ == '__main__':

0 commit comments

Comments
 (0)