mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-07 13:34:59 +03:00
Style
This commit is contained in:
parent
5f85ed322f
commit
8effd9aa4c
|
@ -71,20 +71,20 @@ class CdnFileTamperedError(SecurityError):
|
|||
|
||||
|
||||
class MultiError(Exception):
|
||||
""" Exception container for multiple TL requests """
|
||||
"""Exception container for multiple `TLRequest`'s."""
|
||||
|
||||
def __new__(cls, exceptions, result, requests):
|
||||
if len(result) != len(exceptions) != len(requests):
|
||||
raise ValueError(
|
||||
"Need result, exception and request for each error")
|
||||
'Need result, exception and request for each error')
|
||||
for e, req in zip(exceptions, requests):
|
||||
if not isinstance(e, BaseException):
|
||||
raise TypeError(
|
||||
"Expected and exception object, not %r" % e
|
||||
'Expected and exception object, not %r' % e
|
||||
)
|
||||
if not isinstance(req, TLRequest):
|
||||
raise TypeError(
|
||||
"Expected TLRequest object, not %r" % req
|
||||
'Expected TLRequest object, not %r' % req
|
||||
)
|
||||
|
||||
if len(exceptions) == 1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user