jenkins-community-slave: verify HTTPS certificate in head() request
Fixes a warning: /usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'build.ffh.zone'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
This commit is contained in:
parent
7fdffcaa1c
commit
5232428b19
@ -70,7 +70,7 @@ if os.environ.get('SLAVE_SECRET') is None:
|
|||||||
|
|
||||||
def master_ready(url):
|
def master_ready(url):
|
||||||
try:
|
try:
|
||||||
r = requests.head(url, verify=False, timeout=None)
|
r = requests.head(url, timeout=None)
|
||||||
return r.status_code == requests.codes.ok
|
return r.status_code == requests.codes.ok
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user