From 7b0f36711f928bd8d4835ebcbd9d66bd3e1b74d3 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 11 Nov 2023 07:08:32 +0900 Subject: [PATCH] fix: failure of first startup --- __init__.py | 2 +- prestartup_script.py | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/__init__.py b/__init__.py index 2ff3c43..393bffe 100644 --- a/__init__.py +++ b/__init__.py @@ -13,7 +13,7 @@ import concurrent import ssl from urllib.parse import urlparse -version = "V0.43" +version = "V0.43.1" print(f"### Loading: ComfyUI-Manager ({version})") diff --git a/prestartup_script.py b/prestartup_script.py index d63d405..6a173a0 100644 --- a/prestartup_script.py +++ b/prestartup_script.py @@ -152,16 +152,19 @@ print("** ComfyUI start up time:", datetime.datetime.now()) def check_bypass_ssl(): - import configparser - import ssl - config_path = os.path.join(os.path.dirname(__file__), "config.ini") - config = configparser.ConfigParser() - config.read(config_path) - default_conf = config['default'] - - if 'bypass_ssl' in default_conf and default_conf['bypass_ssl'].lower() == 'true': - print(f"[ComfyUI-Manager] WARN: Unsafe - SSL verification option is Enabled. (see ComfyUI-Manager/config.ini)") - ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix. + try: + import configparser + import ssl + config_path = os.path.join(os.path.dirname(__file__), "config.ini") + config = configparser.ConfigParser() + config.read(config_path) + default_conf = config['default'] + + if 'bypass_ssl' in default_conf and default_conf['bypass_ssl'].lower() == 'true': + print(f"[ComfyUI-Manager] WARN: Unsafe - SSL verification option is Enabled. (see ComfyUI-Manager/config.ini)") + ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix. + except Exception: + pass check_bypass_ssl()