Skip to content

Commit

Permalink
Making errors argument optionnal
Browse files Browse the repository at this point in the history
issue #121
  • Loading branch information
Damien Maillard authored Sep 19, 2016
1 parent d4231d2 commit 96d91e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
class SchemaError(Exception):
"""Error during Schema validation."""

def __init__(self, autos, errors):
def __init__(self, autos, errors=None):
errors = [] if errors is None else errors
self.autos = autos if type(autos) is list else [autos]
self.errors = errors if type(errors) is list else [errors]
Exception.__init__(self, self.code)
Expand Down

0 comments on commit 96d91e6

Please sign in to comment.