mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +01:00
Merge pull request #182 from tsnoam/master
request: better parsing of URLError exception
This commit is contained in:
commit
ee56ffc9a5
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…
Add table
Reference in a new issue