mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Fix insecure ssl in fetch_from_legacy
This commit is contained in:
parent
4206ef1f6a
commit
f6765af4e7
1 changed files with 6 additions and 2 deletions
|
@ -44,9 +44,13 @@ package_filename = sys.argv[3]
|
|||
|
||||
print("Reading index %s" % index_url)
|
||||
|
||||
context = ssl.create_default_context()
|
||||
context.check_hostname = False
|
||||
context.verify_mode = ssl.CERT_NONE
|
||||
|
||||
response = urllib.request.urlopen(
|
||||
index_url,
|
||||
context=ssl.CERT_NONE)
|
||||
context=context)
|
||||
index = response.read()
|
||||
|
||||
parser = Pep503()
|
||||
|
@ -66,7 +70,7 @@ print("Downloading %s" % package_url)
|
|||
|
||||
response = urllib.request.urlopen(
|
||||
package_url,
|
||||
context=ssl.CERT_NONE)
|
||||
context=context)
|
||||
|
||||
with response as r:
|
||||
shutil.copyfileobj(r, package_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue