Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed passing the instance of the exception to the super constructor #24

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pyrakoon/compat/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down