summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2012-06-04 01:13:36 +0200
committerTill Maas <opensource@till.name>2012-06-04 01:13:36 +0200
commitc9b4c16d5b2575e32f3845776f50277165c009fe (patch)
tree7ae02562d40a21be381bf2b193df1b13863f458e
parent8f790295f3dd2ab98b3795fb6eaf7d0ceef3abc1 (diff)
downloadcnucnu-c9b4c16d5b2575e32f3845776f50277165c009fe.tar.gz
cnucnu-c9b4c16d5b2575e32f3845776f50277165c009fe.tar.xz
cnucnu-c9b4c16d5b2575e32f3845776f50277165c009fe.zip
helper: Add timeouts for HTML retrieval
-rw-r--r--cnucnu/helper.py2
1 files changed, 2 insertions, 0 deletions
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()