Errors: Fix passing 'self' to the constructors of the superclasses

This is necessary only if the superclass name is specified explicitly instead of super() call.
This commit is contained in:
Dmitry D. Chernov
2018-02-14 17:09:22 +10:00
parent 08b9d7c4ef
commit 55bcc29ae0
3 changed files with 8 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ class ForbiddenError(RPCError):
message = 'FORBIDDEN'
def __init__(self, message):
super().__init__(self, message)
super().__init__(message)
self.message = message
@@ -52,7 +52,7 @@ class NotFoundError(RPCError):
message = 'NOT_FOUND'
def __init__(self, message):
super().__init__(self, message)
super().__init__(message)
self.message = message
@@ -77,7 +77,7 @@ class ServerError(RPCError):
message = 'INTERNAL'
def __init__(self, message):
super().__init__(self, message)
super().__init__(message)
self.message = message
@@ -121,7 +121,7 @@ class BadMessageError(Exception):
}
def __init__(self, code):
super().__init__(self, self.ErrorMessages.get(
super().__init__(self.ErrorMessages.get(
code,
'Unknown error code (this should not happen): {}.'.format(code)))