request.py: fix for python2.7

This commit is contained in:
Noam Meltzer 2016-02-27 23:13:29 +02:00
parent 26f87c4873
commit ccb24d1288

View file

@ -170,9 +170,7 @@ def post(url,
data=data.encode(),
headers={'Content-Type': 'application/json'})
with urlopen(request, **urlopen_kwargs) as handle:
result = handle.read()
result = urlopen(request, **urlopen_kwargs).read()
return _parse(result)