From c9b4c16d5b2575e32f3845776f50277165c009fe Mon Sep 17 00:00:00 2001 From: Till Maas Date: Mon, 4 Jun 2012 01:13:36 +0200 Subject: helper: Add timeouts for HTML retrieval --- cnucnu/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cnucnu/helper.py b/cnucnu/helper.py index cae8df1..d148e5a 100644 --- a/cnucnu/helper.py +++ b/cnucnu/helper.py @@ -106,6 +106,8 @@ def get_html(url, callback=None, errback=None): c.setopt(pycurl.FOLLOWLOCATION, 1) c.setopt(pycurl.MAXREDIRS, 10) c.setopt(pycurl.USERAGENT, "Fedora Upstream Release Monitoring (https://fedoraproject.org/wiki/Upstream_release_monitoring)") + c.setopt(pycurl.CONNECTTIMEOUT, 10) + c.setopt(pycurl.TIMEOUT, 30) c.perform() c.close() -- cgit