rename print_error to report, use it with together with package name

This commit is contained in:
AUTOMATIC
2023-05-31 19:56:37 +03:00
parent d67ef01f62
commit 05933840f0
24 changed files with 69 additions and 90 deletions

View File

@@ -11,8 +11,7 @@ from datetime import datetime
from collections import OrderedDict
import git
from modules import shared, extensions
from modules.errors import print_error
from modules import shared, extensions, errors
from modules.paths_internal import script_path, config_states_dir
@@ -52,7 +51,7 @@ def get_webui_config():
if os.path.exists(os.path.join(script_path, ".git")):
webui_repo = git.Repo(script_path)
except Exception:
print_error(f"Error reading webui git info from {script_path}", exc_info=True)
errors.report(f"Error reading webui git info from {script_path}", exc_info=True)
webui_remote = None
webui_commit_hash = None
@@ -132,7 +131,7 @@ def restore_webui_config(config):
if os.path.exists(os.path.join(script_path, ".git")):
webui_repo = git.Repo(script_path)
except Exception:
print_error(f"Error reading webui git info from {script_path}", exc_info=True)
errors.report(f"Error reading webui git info from {script_path}", exc_info=True)
return
try:
@@ -140,7 +139,7 @@ def restore_webui_config(config):
webui_repo.git.reset(webui_commit_hash, hard=True)
print(f"* Restored webui to commit {webui_commit_hash}.")
except Exception:
print_error(f"Error restoring webui to commit{webui_commit_hash}")
errors.report(f"Error restoring webui to commit{webui_commit_hash}")
def restore_extension_config(config):