From dd4f798b97de3e32d0a6a1a18816b4cc28c6008e Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:20:49 +0900 Subject: [PATCH] fallback get_config() --- modules/sysinfo.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/sysinfo.py b/modules/sysinfo.py index 52617573b..2c08dd226 100644 --- a/modules/sysinfo.py +++ b/modules/sysinfo.py @@ -179,5 +179,9 @@ def get_extensions(*, enabled): def get_config(): try: return shared.opts.data - except Exception as e: - return str(e) + except Exception as _: + try: + with open(shared.cmd_opts.ui_settings_file, 'r') as f: + return json.load(f) + except Exception as e: + return str(e)