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

@@ -1,8 +1,7 @@
import os
import threading
from modules import shared
from modules.errors import print_error
from modules import shared, errors
from modules.gitpython_hack import Repo
from modules.paths_internal import extensions_dir, extensions_builtin_dir, script_path # noqa: F401
@@ -54,7 +53,7 @@ class Extension:
if os.path.exists(os.path.join(self.path, ".git")):
repo = Repo(self.path)
except Exception:
print_error(f"Error reading github repository info from {self.path}", exc_info=True)
errors.report(f"Error reading github repository info from {self.path}", exc_info=True)
if repo is None or repo.bare:
self.remote = None
@@ -70,7 +69,7 @@ class Extension:
self.version = self.commit_hash[:8]
except Exception:
print_error(f"Failed reading extension data from Git repository ({self.name})", exc_info=True)
errors.report(f"Failed reading extension data from Git repository ({self.name})", exc_info=True)
self.remote = None
self.have_info_from_repo = True