Last active
December 12, 2023 15:13
-
-
Save cschwan/024ca24610cfff40f9da95c8f5a72715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
patch -p0 < openloops_urlopen.patch
in the MATRIX folder