Skip to content

Commit

Permalink
Merge pull request #24 from openvstorage/fix_exception
Browse files Browse the repository at this point in the history
Fixed passing the instance of the exception to the super constructor
JeffreyDevloo authored Mar 7, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 8c1e86c + 01b4f8d commit e114535
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyrakoon/compat/errors.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ def __init__(self, msg=''):
if self._msg is not None and msg == '':
msg = self._msg

super(ArakoonException, self).__init__(self, msg)
super(ArakoonException, self).__init__(msg)


class ArakoonNotFound(ArakoonException, KeyError):
@@ -95,8 +95,9 @@ def __init__(self, fun_name, invalid_args):
msg = fun_name
if invalid_args:
error_string = ', '.join('%s=%s' % arg for arg in invalid_args)
msg, self._msg = ArakoonInvalidArguments._msgF % (fun_name, error_string)
ArakoonException.__init__(self, self._msg)
self._msg = ArakoonInvalidArguments._msgF % (fun_name, error_string)
super(ArakoonInvalidArguments, self).__init__(self._msg)
return

super(ArakoonInvalidArguments, self).__init__(msg)

0 comments on commit e114535

Please sign in to comment.