Skip to content

Commit

Permalink
Except all types of timeout error
Browse files Browse the repository at this point in the history
Closes #4172.
  • Loading branch information
Lonami committed Aug 18, 2023
1 parent 128b707 commit b0f9fd1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion telethon/client/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def _request(self):
else:
return result.bytes

except errors.TimeoutError as e:
except errors.TimedOutError as e:
if self._timed_out:
self.client._log[__name__].warning('Got two timeouts in a row while downloading file')
raise
Expand Down
4 changes: 2 additions & 2 deletions telethon/client/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ async def _update_loop(self: 'TelegramClient'):
diff = await self(get_diff)
except (
errors.ServerError,
errors.TimeoutError,
errors.TimedOutError,
errors.FloodWaitError,
ValueError
) as e:
Expand Down Expand Up @@ -384,7 +384,7 @@ async def _update_loop(self: 'TelegramClient'):
errors.PersistentTimestampOutdatedError,
errors.PersistentTimestampInvalidError,
errors.ServerError,
errors.TimeoutError,
errors.TimedOutError,
errors.FloodWaitError,
ValueError
) as e:
Expand Down
2 changes: 1 addition & 1 deletion telethon/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '1.29.2'
__version__ = '1.29.3'
1 change: 1 addition & 0 deletions telethon_generator/data/errors.csv
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ TTL_MEDIA_INVALID,400,The provided media cannot be used with a TTL
TTL_PERIOD_INVALID,400,The provided TTL Period is invalid
TYPES_EMPTY,400,The types field is empty
TYPE_CONSTRUCTOR_INVALID,400,The type constructor is invalid
Timedout,-503,Timeout while fetching data
Timeout,-503,Timeout while fetching data
UNKNOWN_ERROR,400,
UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs
Expand Down

0 comments on commit b0f9fd1

Please sign in to comment.