mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
potential errors of bool values in config.ini is fixed
This commit is contained in:
parent
c5f1a6db99
commit
772f464af9
@ -23,7 +23,7 @@ sys.path.append(glob_path)
|
||||
import cm_global
|
||||
from manager_util import *
|
||||
|
||||
version = [2, 32, 4]
|
||||
version = [2, 32, 6]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
|
||||
comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
@ -223,15 +223,15 @@ def read_config():
|
||||
'git_exe': default_conf['git_exe'] if 'git_exe' in default_conf else '',
|
||||
'channel_url': default_conf['channel_url'] if 'channel_url' in default_conf else 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main',
|
||||
'share_option': default_conf['share_option'] if 'share_option' in default_conf else 'all',
|
||||
'bypass_ssl': default_conf['bypass_ssl'] if 'bypass_ssl' in default_conf else 'False',
|
||||
'file_logging': default_conf['file_logging'] if 'file_logging' in default_conf else 'True',
|
||||
'bypass_ssl': default_conf['bypass_ssl'].lower() == 'true' if 'bypass_ssl' in default_conf else False,
|
||||
'file_logging': default_conf['file_logging'].lower() == 'true' if 'file_logging' in default_conf else True,
|
||||
'default_ui': default_conf['default_ui'] if 'default_ui' in default_conf else 'none',
|
||||
'component_policy': default_conf['component_policy'] if 'component_policy' in default_conf else 'workflow',
|
||||
'double_click_policy': default_conf['double_click_policy'] if 'double_click_policy' in default_conf else 'copy-all',
|
||||
'windows_selector_event_loop_policy': default_conf['windows_selector_event_loop_policy'] if 'windows_selector_event_loop_policy' in default_conf else 'False',
|
||||
'model_download_by_agent': default_conf['model_download_by_agent'] if 'model_download_by_agent' in default_conf else 'False',
|
||||
'windows_selector_event_loop_policy': default_conf['windows_selector_event_loop_policy'].lower() == 'true' if 'windows_selector_event_loop_policy' in default_conf else False,
|
||||
'model_download_by_agent': default_conf['model_download_by_agent'].lower() == 'true' if 'model_download_by_agent' in default_conf else False,
|
||||
'downgrade_blacklist': default_conf['downgrade_blacklist'] if 'downgrade_blacklist' in default_conf else '',
|
||||
'disable_unsecure_features': default_conf['disable_unsecure_features'] if 'disable_unsecure_features' in default_conf else 'False',
|
||||
'disable_unsecure_features': default_conf['disable_unsecure_features'].lower() == 'true' if 'disable_unsecure_features' in default_conf else False,
|
||||
}
|
||||
|
||||
except Exception:
|
||||
@ -1192,4 +1192,4 @@ def unzip(model_path):
|
||||
|
||||
|
||||
def is_unsecure_features_disabled():
|
||||
return get_config()['disable_unsecure_features'].lower() == 'true'
|
||||
return get_config()['disable_unsecure_features']
|
||||
|
||||
@ -49,7 +49,7 @@ def check_file_logging():
|
||||
config.read(config_path)
|
||||
default_conf = config['default']
|
||||
|
||||
if 'file_logging' in default_conf and default_conf['file_logging'].lower() == 'false':
|
||||
if 'file_logging' in default_conf and not default_conf['file_logging']:
|
||||
enable_file_logging = False
|
||||
except Exception:
|
||||
pass
|
||||
@ -364,7 +364,7 @@ def check_bypass_ssl():
|
||||
config.read(config_path)
|
||||
default_conf = config['default']
|
||||
|
||||
if 'bypass_ssl' in default_conf and default_conf['bypass_ssl'].lower() == 'true':
|
||||
if 'bypass_ssl' in default_conf and default_conf['bypass_ssl']:
|
||||
print(f"[ComfyUI-Manager] WARN: Unsafe - SSL verification bypass option is Enabled. (see ComfyUI-Manager/config.ini)")
|
||||
ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix.
|
||||
except Exception:
|
||||
@ -586,7 +586,7 @@ def check_windows_event_loop_policy():
|
||||
config.read(config_path)
|
||||
default_conf = config['default']
|
||||
|
||||
if 'windows_selector_event_loop_policy' in default_conf and default_conf['windows_selector_event_loop_policy'].lower() == 'true':
|
||||
if 'windows_selector_event_loop_policy' in default_conf and default_conf['windows_selector_event_loop_policy']:
|
||||
try:
|
||||
import asyncio
|
||||
import asyncio.windows_events
|
||||
|
||||
Loading…
Reference in New Issue
Block a user