Skip to content

Commit 1045150

Browse files
committed
fix for issue python-telegram-bot#79
1 parent c64e577 commit 1045150

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

telegram/utils/request.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ def post(url,
110110
if error.getcode() == 502:
111111
raise TelegramError('Bad Gateway')
112112

113-
message = _parse(error.read())
113+
try:
114+
message = _parse(error.read())
115+
except ValueError:
116+
message = 'Unknown HTTPError'
117+
114118
raise TelegramError(message)
115119
except (SSLError, socket.timeout) as error:
116120
if "operation timed out" in str(error):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy