Addon Manager: Make sure metadata gets parsed

This commit is contained in:
Chris Hennes
2022-10-04 12:58:47 -05:00
parent ebe7ceea33
commit ff57a13dcf
2 changed files with 29 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ from addonmanager_git import initialize_git, GitFailed
translate = FreeCAD.Qt.translate
# Workers only have one public method by design
# pylint: disable=too-few-public-methods
# pylint: disable=c-extension-no-member,too-few-public-methods,too-many-instance-attributes
class CreateAddonListWorker(QtCore.QThread):
@@ -174,7 +174,15 @@ class CreateAddonListWorker(QtCore.QThread):
name = addon["url"].split("/")[-1]
if name in self.package_names:
# We already have something with this name, skip this one
FreeCAD.Console.PrintWarning(
translate(
"AddonsInstaller", "WARNING: Duplicate addon {} ignored"
).format(name)
)
continue
FreeCAD.Console.PrintLog(
f"Adding custom location {addon['url']} with branch {addon['branch']}\n"
)
self.package_names.append(name)
addondir = os.path.join(self.moddir, name)
if os.path.exists(addondir) and os.listdir(addondir):