Skip to content

Commit 45053f9

Browse files
committed
catch errors in http response
1 parent 8e4db5a commit 45053f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

isso/utils/http.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ def __enter__(self):
3939
except (httplib.HTTPException, socket.error):
4040
return None
4141

42-
return self.con.getresponse()
42+
try:
43+
return self.con.getresponse()
44+
except httplib.HTTPException:
45+
return None
4346

4447
def __exit__(self, exc_type, exc_value, traceback):
4548
self.con.close()

0 commit comments

Comments
 (0)