mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-25 08:37:07 +01:00
request: better parsing of URLError exception
This commit is contained in:
parent
04c86813b3
commit
2338377eda
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ def _try_except_req(func):
|
|||
raise NetworkError('{0} ({1})'.format(message, errcode))
|
||||
|
||||
except URLError as error:
|
||||
raise NetworkError('URLError: {0!r}'.format(error))
|
||||
raise NetworkError('URLError: {0}'.format(error.reason))
|
||||
|
||||
except (SSLError, socket.timeout) as error:
|
||||
err_s = str(error)
|
||||
|
|
Loading…
Reference in a new issue