Skip to content

Commit

Permalink
fix: cleanup useless code in errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Jul 12, 2023
1 parent 8117244 commit cf889ac
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/joserfc/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ class JoseError(Exception):
#: long-string to describe this error
description = ""

def __init__(self, description: Optional[str] = None, error: Optional[str] = None):
if error is not None:
self.error = error
def __init__(self, description: Optional[str] = None):
if description is not None:
self.description = description

message = "{}: {}".format(self.error, self.description)
super(JoseError, self).__init__(message)

def __repr__(self):
return '<{} "{}">'.format(self.__class__.__name__, self.error)


class DecodeError(JoseError):
error = "decode_error"
Expand Down

0 comments on commit cf889ac

Please sign in to comment.