diff --git a/schema.py b/schema.py index 8fb9f6f..5b25f48 100644 --- a/schema.py +++ b/schema.py @@ -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)