Skip to content

Commit f63205f

Browse files
authored
Use requests library to resolve SSL errors. (#1450)
1 parent 5e58675 commit f63205f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

glob/manager_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ def cnr_switch_version_instant(self, node_id, version_spec=None, instant_executi
893893

894894
archive_name = f"CNR_temp_{str(uuid.uuid4())}.zip" # should be unpredictable name - security precaution
895895
download_path = os.path.join(get_default_custom_nodes_path(), archive_name)
896-
manager_downloader.download_url(node_info.download_url, get_default_custom_nodes_path(), archive_name)
896+
manager_downloader.basic_download_url(node_info.download_url, get_default_custom_nodes_path(), archive_name)
897897

898898
# 2. extract files into <node_id>
899899
install_path = self.active_nodes[node_id][1]

glob/manager_downloader.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
1717

1818

19-
def basic_download_url(url, dest_folder, filename):
19+
def basic_download_url(url, dest_folder: str, filename: str):
20+
'''
21+
Download file from url to dest_folder with filename
22+
using requests library.
23+
'''
2024
import requests
2125

2226
# Ensure the destination folder exists
@@ -111,4 +115,4 @@ def download_url_with_agent(url, save_path):
111115
return False
112116

113117
print("Installation was successful.")
114-
return True
118+
return True

0 commit comments

Comments
 (0)