Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use requests library to resolve SSL errors. #1450

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion glob/manager_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ def cnr_switch_version_instant(self, node_id, version_spec=None, instant_executi

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

# 2. extract files into <node_id>
install_path = self.active_nodes[node_id][1]
Expand Down
8 changes: 6 additions & 2 deletions glob/manager_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))


def basic_download_url(url, dest_folder, filename):
def basic_download_url(url, dest_folder: str, filename: str):
'''
Download file from url to dest_folder with filename
using requests library.
'''
import requests

# Ensure the destination folder exists
Expand Down Expand Up @@ -111,4 +115,4 @@ def download_url_with_agent(url, save_path):
return False

print("Installation was successful.")
return True
return True
Loading