Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion csep/utils/comcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ def _search(**newargs):

except URLError as URLe:
# Fails to verify SSL certificate, when there is a hostname mismatch
if isinstance(URLe.reason, ssl.SSLCertVerificationError) and URLe.reason.verify_code == 62:
if (isinstance(URLe.reason, ssl.SSLCertVerificationError) and URLe.reason.verify_code == 62) \
or (isinstance(URLe.reason, ssl.SSLError) and URLe.reason.errno == 5):
Comment on lines +316 to +317
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added additional reason and error code to make this compatible with Python 3.8-3.11.

try:
context = ssl._create_unverified_context()
fh = request.urlopen(url, timeout=TIMEOUT, context=context)
Expand Down