Addon manager: strip possible whitespaces in dependencies checking

This commit is contained in:
Yorik van Havre
2017-05-31 19:23:28 -03:00
parent 0f0db7122f
commit cc4aae5823

View File

@@ -604,14 +604,14 @@ class InstallWorker(QtCore.QThread):
if l.startswith("workbenches="):
depswb = l.split("=")[1].split(",")
for wb in depswb:
if not wb in FreeCADGui.listWorkbenches().keys():
if not wb.strip() in FreeCADGui.listWorkbenches().keys():
ok = False
message += translate("AddonsInstaller","Missing workbench") + ": " + wb + ", "
elif l.startswith("pylibs="):
depspy = l.split("=")[1].split(",")
for pl in depspy:
try:
__import__(pl)
__import__(pl.strip())
except:
ok = False
message += translate("AddonsInstaller","Missing python module") +": " + pl + ", "