<div dir="ltr"><div><div><div><div>Hi Python group, <br><br></div>I wrote a code to execute list of jenkins job by reading a text file. So far, it's able to read the text file and get the jobs one by one. Only problem is with the requests command<br><br></div>Please see the sample code below<br><br> #!/usr/bin/env python<br>import requests,time,json<br>fobj = open("file")<br>for x in fobj:<br>       x = x.replace("\n", "")<br>       url="https://username:password@localhost/jenkins/job/job-name/buildWithParameters"<br>       params = {'BRANCH':x}<br>       headers = {"Content-Type": "application/xml"}<br>       r = request.post(url , params=params, verify=False)<br>       print(r.status_code)<br>       print(r.text)<br>       #time.sleep(45)<br>fobj.close() <br><br><br></div>Error<br>------<br>Traceback (most recent call last):<br> File "./delete_build_job_exeuction.py", line 12, in <module><br>   r = sess.post(url , params=params, verify=False)<br> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 555, in post<br>   return self.request('POST', url, data=data, json=json, **kwargs)<br> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 508, in request<br>   resp = self.send(prep, **send_kwargs)<br> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 618, in send<br>   r = adapter.send(request, **kwargs)<br> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 506, in send<br>   raise SSLError(e, request=request)<br>requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /jenkins/job/job--name/buildWithParameter/buildWithParameters?BRANCH=super (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:590)'),)) <br><br><br></div>Could you please help ?<br><div><br></div></div>