Fix manual raising of RPC errors

This commit is contained in:
Lonami Exo 2019-05-27 18:18:38 +02:00
parent 1354bf68a8
commit 9f72bd8ca3
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ class AuthMethods(MessageParseMethods, UserMethods):
print('Invalid password. Please try again',
file=sys.stderr)
else:
raise errors.PasswordHashInvalidError(None)
raise errors.PasswordHashInvalidError(request=None)
else:
me = await self.sign_in(phone=phone, password=password)

View File

@ -35,7 +35,7 @@ class UserMethods(TelegramBaseClient):
await asyncio.sleep(diff, loop=self._loop)
self._flood_waited_requests.pop(r.CONSTRUCTOR_ID, None)
else:
raise errors.FloodWaitError(r, capture=diff)
raise errors.FloodWaitError(request=r, capture=diff)
request_index = 0
self._last_request = time.time()