diff --git a/telethon/client/users.py b/telethon/client/users.py index c7740f9e..2120fde2 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -52,7 +52,7 @@ class UserMethods(TelegramBaseClient): exceptions.append(None) results.append(result) request_index += 1 - if exceptions: + if any(x is not None for x in exceptions): raise MultiError(exceptions, results, requests) else: return results diff --git a/telethon/errors/common.py b/telethon/errors/common.py index b81caecc..9af19c9f 100644 --- a/telethon/errors/common.py +++ b/telethon/errors/common.py @@ -78,13 +78,13 @@ class MultiError(Exception): raise ValueError( 'Need result, exception and request for each error') for e, req in zip(exceptions, requests): - if not isinstance(e, BaseException): + if not isinstance(e, BaseException) and e is not None: raise TypeError( - 'Expected and exception object, not %r' % e + "Expected an 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: