Skip to content

Commit

Permalink
Use more explicit error
Browse files Browse the repository at this point in the history
  • Loading branch information
sbellem committed Jun 21, 2017
1 parent d108892 commit 3e04904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cryptoconditions/types/ed25519.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _validate_public_key(self, public_key):
if not isinstance(public_key, bytes):
raise TypeError('public_key must be bytes')
if len(public_key) != self.PUBLIC_KEY_LENGTH:
raise Exception(
raise ValueError(
'Public key must be {} bytes, was: {}'.format(
self.PUBLIC_KEY_LENGTH, len(public_key)))
# TODO More validation? Ask ILP folks.
Expand Down

0 comments on commit 3e04904

Please sign in to comment.