Skip to content

Instantly share code, notes, and snippets.

@cschwan
Last active December 12, 2023 15:13
Show Gist options
  • Save cschwan/024ca24610cfff40f9da95c8f5a72715 to your computer and use it in GitHub Desktop.
Save cschwan/024ca24610cfff40f9da95c8f5a72715 to your computer and use it in GitHub Desktop.
--- external/OpenLoops-install/pyol/bin/download_process.py 2023-12-12 15:41:57.205973359 +0100
+++ external/OpenLoops-install/pyol/bin/download_process.py.new 2023-12-12 15:42:07.918020965 +0100
@@ -116,7 +116,11 @@
if remote_channel_url.startswith('/'):
rfh = open(remote_channel_url, 'rb')
else:
- rfh = urlopen(remote_channel_url)
+ import ssl
+ ctx = ssl.create_default_context()
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ rfh = urlopen(remote_channel_url, context=ctx)
except (URLError, IOError) as e:
print('Warning: Channel database update for repository ' + repo_name +
' failed (' + str(e) + '). Skip this repository.')
@@ -218,7 +222,11 @@
if remote_archive.startswith('/'):
rf = open(remote_archive, 'rb')
else:
- rf = urlopen(remote_archive)
+ import ssl
+ ctx = ssl.create_default_context()
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ rf = urlopen(remote_archive, context=ctx)
except (URLError, IOError):
print('*** DOWNLOAD FAILED ***')
if args.ignore:
--- external/OpenLoops-install/pyol/tools/OLToolbox.py 2023-12-12 14:01:50.839508200 +0100
+++ external/OpenLoops-install/pyol/tools/OLToolbox.py.new 2023-12-12 15:29:31.194609863 +0100
@@ -77,7 +77,11 @@
from urllib.error import URLError
decode = True
try:
- fh = urlopen(filename)
+ import ssl
+ ctx = ssl.create_default_context()
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ fh = urlopen(filename, context=ctx)
except URLError:
if fatal:
if '%s' in error_message:
@cschwan
Copy link
Author

cschwan commented Dec 12, 2023

  1. Download the file using the 'Raw' URL with wget
  2. Run patch -p0 < openloops_urlopen.patch in the MATRIX folder
  3. Run MATRIX again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment