aboutsummaryrefslogtreecommitdiffstats
path: root/modules/launch_utils.py
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2023-05-29 05:54:13 +0000
committerAarni Koskela <akx@iki.fi>2023-05-29 06:17:30 +0000
commit00dfe27f59727407c5b408a80ff2a262934df495 (patch)
treeaae9d324a719c7e500f4a0c45821851bc6e41ee0 /modules/launch_utils.py
parentb957dcfece29c84ac0cfcd5a69475ff8684c531f (diff)
downloadstable-diffusion-webui-gfx803-00dfe27f59727407c5b408a80ff2a262934df495.tar.gz
stable-diffusion-webui-gfx803-00dfe27f59727407c5b408a80ff2a262934df495.tar.bz2
stable-diffusion-webui-gfx803-00dfe27f59727407c5b408a80ff2a262934df495.zip
Add & use modules.errors.print_error where currently printing exception info by hand
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r--modules/launch_utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py
index 35a52310..22edc106 100644
--- a/modules/launch_utils.py
+++ b/modules/launch_utils.py
@@ -8,6 +8,7 @@ import json
from functools import lru_cache
from modules import cmd_args
+from modules.errors import print_error
from modules.paths_internal import script_path, extensions_dir
args, _ = cmd_args.parser.parse_known_args()
@@ -188,7 +189,7 @@ def run_extension_installer(extension_dir):
print(run(f'"{python}" "{path_installer}"', errdesc=f"Error running install.py for extension {extension_dir}", custom_env=env))
except Exception as e:
- print(e, file=sys.stderr)
+ print_error(str(e))
def list_extensions(settings_file):
@@ -198,8 +199,8 @@ def list_extensions(settings_file):
if os.path.isfile(settings_file):
with open(settings_file, "r", encoding="utf8") as file:
settings = json.load(file)
- except Exception as e:
- print(e, file=sys.stderr)
+ except Exception:
+ print_error("Could not load settings", exc_info=True)
disabled_extensions = set(settings.get('disabled_extensions', []))
disable_all_extensions = settings.get('disable_all_extensions', 'none')