Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addonmanager_dependency_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _verify_pip(self) -> bool:
no_pip signal if pip cannot execute."""
try:
proc = self._run_pip(["--version"])
fci.Console.PrintMessage(proc.stdout + "\n")
fci.Console.PrintLog(proc.stdout + "\n")
if proc.returncode != 0:
return False
except subprocess.CalledProcessError:
Expand All @@ -134,7 +134,7 @@ def _install_required(self, vendor_path: str) -> bool:
pymod,
]
)
fci.Console.PrintMessage(proc.stdout + "\n")
fci.Console.PrintLog(proc.stdout + "\n")
except subprocess.CalledProcessError as e:
fci.Console.PrintError(str(e) + "\n")
self.failure.emit(
Expand Down Expand Up @@ -162,7 +162,7 @@ def _install_optional(self, vendor_path: str):
pymod,
]
)
fci.Console.PrintMessage(proc.stdout + "\n")
fci.Console.PrintLog(proc.stdout + "\n")
except subprocess.CalledProcessError as e:
fci.Console.PrintError(
translate("AddonsInstaller", "Installation of optional package failed")
Expand Down
8 changes: 5 additions & 3 deletions addonmanager_installation_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _migrate_to_manifest_file(self, catalog: AddonCatalog):
"freecad_version": "",
}
else:
fci.Console.PrintMessage("Migrate to Manifest, skipping file: " + addon_id + "\n")
fci.Console.PrintLog("Migrate to Manifest, skipping file: " + addon_id + "\n")

def load_manifest(self):
"""Load the manifest from the disk"""
Expand All @@ -125,11 +125,13 @@ def _scan_mod_path_for_extras(self, catalog: AddonCatalog):
branches = catalog.get_available_branches(addon_id)
if not branches:
if "backup" in addon_id:
fci.Console.PrintMessage("Found old backup directory: " + addon_id + "\n")
fci.Console.PrintLog("Found old backup directory: " + addon_id + "\n")
self.old_backups.append(addon_id)
else:
fci.Console.PrintMessage(
"Found addon not in main AM catalog: " + addon_id + "\n"
"Found installed addon that is not in the official index: "
+ addon_id
+ "\n"
)
self.unrecognized_directories.append(addon_id)

Expand Down
8 changes: 4 additions & 4 deletions addonmanager_installer_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def shutdown(self):
def _stop_thread(thread: QtCore.QThread):
if thread and hasattr(thread, "quit"):
if thread.isRunning():
fci.Console.PrintMessage(
fci.Console.PrintWarning(
"INTERNAL ERROR: a QThread is still running when it should have finished"
)

Expand Down Expand Up @@ -358,7 +358,7 @@ def _install_toolbar_button(self) -> None:
if custom_toolbar:
self._install_macro_to_toolbar(custom_toolbar)
else:
fci.Console.PrintMessage("In the end, no custom toolbar was set, bailing out\n")
fci.Console.PrintWarning("In the end, no custom toolbar was set, bailing out\n")

def _install_macro_to_toolbar(self, toolbar) -> None:
"""Adds an icon for the given macro to the given toolbar."""
Expand Down Expand Up @@ -389,7 +389,7 @@ def _install_macro_to_toolbar(self, toolbar) -> None:
f.write(self.addon_to_install.macro.icon_data)
pixmap_text = icon_file
else:
fci.Console.PrintMessage(
fci.Console.PrintLog(
f"No cached icon data for {self.addon_to_install.macro.name}\n"
)
pixmap_text = None
Expand Down Expand Up @@ -450,7 +450,7 @@ def shutdown(self):
def _stop_thread(thread: QtCore.QThread):
if thread and hasattr(thread, "quit"):
if thread.isRunning():
fci.Console.PrintMessage(
fci.Console.PrintWarning(
"INTERNAL ERROR: a QThread is still running when it should have finished"
)

Expand Down
6 changes: 3 additions & 3 deletions addonmanager_macro_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _cleanup_comment(self):

def _cleanup_license(self):
if len(self.parse_results["license"].strip()) == 0:
fci.Console.PrintWarning(
fci.Console.PrintLog(
f"No license specified for macro {self.name} -- assuming 'All rights reserved'.\n"
)
self.parse_results["license"] = "All rights reserved"
Expand All @@ -213,12 +213,12 @@ def _cleanup_license(self):
lm = get_license_manager()
normed_license = lm.normalize(self.parse_results["license"])
if not normed_license:
fci.Console.PrintWarning(
fci.Console.PrintLog(
f"Failed to normalize license '{self.parse_results['license']}' for macro '{self.name}'\n"
)
return
elif normed_license != self.parse_results["license"]:
fci.Console.PrintMessage(
fci.Console.PrintLog(
f"Normalized license '{self.parse_results['license']}' for macro '{self.name}' to {normed_license}\n"
)
self.parse_results["license"] = normed_license
Expand Down
7 changes: 5 additions & 2 deletions addonmanager_workers_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def process_addon_cache(self, catalog_text_data):
if name_of_first_entry is None:
name_of_first_entry = branch_display_name
else:
fci.Console.PrintMessage(
fci.Console.PrintLog(
f"Found additional branch '{branch_display_name}' for addon {addon_id}\n"
)
except Exception as e:
Expand Down Expand Up @@ -939,5 +939,8 @@ def run(self):
message += f"Missing required Python packages: {len(md.python_requires)}\n"
message += f"Missing optional Python packages: {len(md.python_optional)}\n"
message += f"Minimum required Python version evaluated to {md.python_min_version}\n\n"
fci.Console.PrintMessage(message)
if len(md.wbs) + len(md.external_addons) + len(md.python_requires) > 0:
fci.Console.PrintMessage(message)
else:
fci.Console.PrintLog(message)
fci.Console.PrintLog(details)
Loading