From 894086bda2545fc7d094def6f925b96905920992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=A4ber?= Date: Thu, 19 Feb 2015 13:23:05 +0100 Subject: [PATCH] Fix catch socket timeout and error exceptions --- isso/utils/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isso/utils/http.py b/isso/utils/http.py index 7a347c6..fa3cd9e 100644 --- a/isso/utils/http.py +++ b/isso/utils/http.py @@ -39,7 +39,10 @@ class curl(object): except (httplib.HTTPException, socket.error): return None - return self.con.getresponse() + try: + return self.con.getresponse() + except (socket.timeout, socket.error): + return None def __exit__(self, exc_type, exc_value, traceback): self.con.close()