Commit 57538b29 authored by Dan Johansen's avatar Dan Johansen Committed by GitHub

Merge pull request #1 from scachemaille/patch-1

Fix SSL error with HTTPS mirros
parents 8d09ea0e 130d3a0c
......@@ -27,6 +27,7 @@ import os
import sys
import tempfile
import time
import ssl
from builtins import staticmethod
from decimal import Decimal
from operator import itemgetter
......@@ -317,8 +318,9 @@ class PacmanMirrors:
start = time.time()
req = Request(url)
context = ssl.create_default_context()
with urlopen(req, timeout=self.max_wait_time) as r:
with urlopen(req, timeout=self.max_wait_time, context=context) as r:
resp =
d = resp.find(b"date=")
except URLError as e:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment