Skip to content

Commit

Permalink
Fix example in readme (#180)
Browse files Browse the repository at this point in the history
Validation results are currently in `YamaleError.results` instead of `YamaleError.value.results` - https://github.com/23andMe/Yamale/blob/master/yamale/yamale_error.py#L5 .
  • Loading branch information
Yu-AnChen authored Nov 3, 2021
1 parent 833fe6e commit 085a4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ try:
print('Validation success! 👍')
except YamaleError as e:
print('Validation failed!\n')
for result in e.value.results:
for result in e.results:
print("Error validating data '%s' with '%s'\n\t" % (result.data, result.schema))
for error in result.errors:
print('\t%s' % error)
Expand Down

0 comments on commit 085a4e6

Please sign in to comment.