Skip to content

Commit

Permalink
removed custom exception in favor of ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
deadPix3l committed Oct 5, 2018
1 parent 3d80abc commit 366083b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions olclient/common.py
Expand Up @@ -52,8 +52,6 @@ def add_id(self, id_type, identifier):
def __repr__(self):
return '<%s %s>' % (str(self.__class__)[1:-1], self.__dict__)

class SuspiciousAuthorFormatException(Exception):
pass

class Author(Entity):
"""Represets a book Author and their identifier on a service
Expand All @@ -68,7 +66,7 @@ class Author(Entity):
def __init__(self, name, identifiers=None, **kwargs):
super(Author, self).__init__(identifiers=identifiers)
if ',' in name:
raise SuspiciousAuthorFormatException("{} is not a valid Author name - No commas allowed (first last)".format(name))
raise ValueError("{} is not a valid Author name - No commas allowed (first last)".format(name))
self.name = name

for kwarg in kwargs:
Expand Down

0 comments on commit 366083b

Please sign in to comment.