mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
request: catch socket.error
socket.error is another exception which is thrown by the underlying infrastacture and not handled by the urllib2 or httplib layers fixes #236
This commit is contained in:
parent
a9b305edd0
commit
ecc86d4bcd
1 changed files with 3 additions and 0 deletions
|
@ -106,6 +106,9 @@ def _try_except_req(func):
|
|||
except HTTPException as error:
|
||||
raise NetworkError('HTTPException: {0!r}'.format(error))
|
||||
|
||||
except socket.error as error:
|
||||
raise NetworkError('socket.error: {0!r}'.format(error))
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue