]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Use proxy for isUrlFetchable
authorJohn Dilley <john.dilley@citrix.com>
Fri, 9 Oct 2015 08:59:53 +0000 (09:59 +0100)
committerJohn Dilley <john.dilley@citrix.com>
Fri, 9 Oct 2015 08:59:53 +0000 (09:59 +0100)
build/config.mk.sample
exec/xenrt/util.py

index c46b7354710e1db072fd719ac611238f154dc5a8..79e8ba168e76b4276d9b505ed397a307cec9aa7c 100755 (executable)
@@ -5,7 +5,7 @@
 ROOT                = $(shell realpath ..)
 
 SITE                = DEV
-WEB_CONTROL_PATH    = http://localhost/control/
+WEB_CONTROL_PATH    = http://xenrt.citrite.net/xenrt
 GITPATH             = git@gitlab.citrite.net:xenrt
 
 PRODUCTIONCONFIG    = no
index 7bf59b495cd7d18b7c35dc6f17e7a37cee7c1d7c..95dcc13aa9eb68cabac71ee47568bbc9850669c0 100755 (executable)
@@ -1560,7 +1560,11 @@ def getCCPCommit(distro):
 def isUrlFetchable(filename):
     xenrt.TEC().logverbose("Attempting to check response for %s" % filename)
     try:
-        r = requests.head(filename, allow_redirects=True)
+        proxy = xenrt.TEC().lookup("HTTP_PROXY", None)
+        kwargs = {}
+        if proxy:
+            kwargs['proxies'] = {"http": proxy, "https": proxy}
+        r = requests.head(filename, allow_redirects=True, **kwargs)
         return (r.status_code == 200)
     except:
         return False