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):
|
class MultiError(Exception):
|
||||||
""" Exception container for multiple TL requests """
|
"""Exception container for multiple `TLRequest`'s."""
|
||||||
|
|
||||||
def __new__(cls, exceptions, result, requests):
|
def __new__(cls, exceptions, result, requests):
|
||||||
if len(result) != len(exceptions) != len(requests):
|
if len(result) != len(exceptions) != len(requests):
|
||||||
raise ValueError(
|
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):
|
for e, req in zip(exceptions, requests):
|
||||||
if not isinstance(e, BaseException):
|
if not isinstance(e, BaseException):
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
"Expected and exception object, not %r" % e
|
'Expected and exception object, not %r' % e
|
||||||
)
|
)
|
||||||
if not isinstance(req, TLRequest):
|
if not isinstance(req, TLRequest):
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
"Expected TLRequest object, not %r" % req
|
'Expected TLRequest object, not %r' % req
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(exceptions) == 1:
|
if len(exceptions) == 1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user