Keep CKAN DataPusher add-ca-cert on py2.7

This commit is contained in:
Disassembler 2020-03-14 09:47:33 +01:00
parent c7b0ea28b2
commit 243c8a4542
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -1,7 +1,7 @@
#!/usr/bin/python3
#!/usr/bin/python
import ssl
cert = ssl.get_server_certificate(('host', 443))
with open('/usr/lib/python3.8/site-packages/certifi/cacert.pem', 'a') as f:
with open('/usr/lib/python2.7/site-packages/requests/cacert.pem', 'a') as f:
f.write(cert)