fix for issue #79

This commit is contained in:
Jannes Höke 2015-11-12 19:15:39 +01:00
parent c64e577049
commit 10451509f1

View file

@ -110,7 +110,11 @@ def post(url,
if error.getcode() == 502:
raise TelegramError('Bad Gateway')
message = _parse(error.read())
try:
message = _parse(error.read())
except ValueError:
message = 'Unknown HTTPError'
raise TelegramError(message)
except (SSLError, socket.timeout) as error:
if "operation timed out" in str(error):