X Tutup
Skip to content

Commit ccb24d1

Browse files
committed
request.py: fix for python2.7
1 parent 26f87c4 commit ccb24d1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

telegram/utils/request.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ def post(url,
170170
data=data.encode(),
171171
headers={'Content-Type': 'application/json'})
172172

173-
with urlopen(request, **urlopen_kwargs) as handle:
174-
result = handle.read()
175-
173+
result = urlopen(request, **urlopen_kwargs).read()
176174
return _parse(result)
177175

178176

0 commit comments

Comments
 (0)
X Tutup