mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Fix errors found by new tests (#1389)
This commit is contained in:
parent
c6bd620555
commit
95dc775344
|
@ -7,6 +7,7 @@ class RPCError(Exception):
|
||||||
super().__init__('RPCError {}: {}{}'.format(
|
super().__init__('RPCError {}: {}{}'.format(
|
||||||
code or self.code, message, self._fmt_request(request)))
|
code or self.code, message, self._fmt_request(request)))
|
||||||
|
|
||||||
|
self.request = request
|
||||||
self.code = code
|
self.code = code
|
||||||
self.message = message
|
self.message = message
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ class RPCError(Exception):
|
||||||
return ' (caused by {})'.format(request.__class__.__name__)
|
return ' (caused by {})'.format(request.__class__.__name__)
|
||||||
|
|
||||||
def __reduce__(self):
|
def __reduce__(self):
|
||||||
return type(self), (self.code, self.message)
|
return type(self), (self.request, self.message, self.code)
|
||||||
|
|
||||||
|
|
||||||
class InvalidDCError(RPCError):
|
class InvalidDCError(RPCError):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user