mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
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:
@@ -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)))
|
||||
|
||||
|
Reference in New Issue
Block a user