Skip to content

Commit

Permalink
better message
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaCrotti committed Oct 17, 2016
1 parent 77086ae commit c2e01a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voluptuous/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def __init__(self, kind):

def __call__(self, v):
if v is not None and not isinstance(v, self.kind):
raise Invalid("%s not of type %s" % (v, self.kind))
raise Invalid("%s must be None or of type %s" % (v, self.kind))

return v

Expand Down

0 comments on commit c2e01a1

Please sign in to comment.