mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +01:00
fix for issue #79
This commit is contained in:
parent
c64e577049
commit
10451509f1
1 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,11 @@ def post(url,
|
||||||
if error.getcode() == 502:
|
if error.getcode() == 502:
|
||||||
raise TelegramError('Bad Gateway')
|
raise TelegramError('Bad Gateway')
|
||||||
|
|
||||||
message = _parse(error.read())
|
try:
|
||||||
|
message = _parse(error.read())
|
||||||
|
except ValueError:
|
||||||
|
message = 'Unknown HTTPError'
|
||||||
|
|
||||||
raise TelegramError(message)
|
raise TelegramError(message)
|
||||||
except (SSLError, socket.timeout) as error:
|
except (SSLError, socket.timeout) as error:
|
||||||
if "operation timed out" in str(error):
|
if "operation timed out" in str(error):
|
||||||
|
|
Loading…
Add table
Reference in a new issue