fixed: robust install if db is broken

This commit is contained in:
Dr.Lt.Data
2025-02-08 07:18:57 +09:00
parent e732a39fea
commit 22878f4ef8
3 changed files with 4 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 17, 9]
version_code = [3, 17, 10]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')

View File

@@ -96,7 +96,7 @@ async def get_risky_level(files, pip_packages):
all_urls = set()
for x in json_data1['custom_nodes'] + json_data2['custom_nodes']:
all_urls.update(x['files'])
all_urls.update(x.get('files', []))
for x in files:
if x not in all_urls:
@@ -104,8 +104,7 @@ async def get_risky_level(files, pip_packages):
all_pip_packages = set()
for x in json_data1['custom_nodes'] + json_data2['custom_nodes']:
if "pip" in x:
all_pip_packages.update(x['pip'])
all_pip_packages.update(x.get('pip', []))
for p in pip_packages:
if p not in all_pip_packages: