Addon Manager: Additional diagnostics for Macro updates
This commit is contained in:
@@ -1473,6 +1473,8 @@ class CommandAddonManager:
|
||||
def update_progress_bar(self, current_value: int, max_value: int) -> None:
|
||||
"""Update the progress bar, showing it if it's hidden"""
|
||||
|
||||
max_value = max_value if max_value > 0 else 1
|
||||
|
||||
if current_value < 0:
|
||||
current_value = 0
|
||||
elif current_value > max_value:
|
||||
|
||||
@@ -628,6 +628,7 @@ class FillMacroListWorker(QtCore.QThread):
|
||||
try:
|
||||
if os.path.exists(self.repo_dir):
|
||||
if not os.path.exists(os.path.join(self.repo_dir, ".git")):
|
||||
FreeCAD.Console.PrintWarning(translate("AddonsInstaller","Attempting to change non-git Macro setup to use git\n"))
|
||||
utils.repair_git_repo(
|
||||
"https://github.com/FreeCAD/FreeCAD-macros.git", self.repo_dir
|
||||
)
|
||||
@@ -644,6 +645,8 @@ class FillMacroListWorker(QtCore.QThread):
|
||||
)
|
||||
+ f":\n{e}\n"
|
||||
)
|
||||
FreeCAD.Console.PrintWarning(f"{self.repo_dir}\n")
|
||||
return
|
||||
n_files = 0
|
||||
for _, _, filenames in os.walk(self.repo_dir):
|
||||
n_files += len(filenames)
|
||||
|
||||
Reference in New Issue
Block a user