Skip to content

Commit

Permalink
Addon manager: Added check for optional py dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jun 1, 2017
1 parent 749d666 commit 99e400e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Mod/AddonManager/AddonManager.py
Expand Up @@ -617,7 +617,15 @@ def checkDependencies(self,baseurl):
except:
ok = False
message += translate("AddonsInstaller","Missing python module") +": " + pl + ", "
if message:
elif l.startswith("optionalpylibs="):
opspy = l.split("=")[1].split(",")
for pl in opspy:
if pl.strip():
try:
__import__(pl.strip())
except:
message += translate("AddonsInstaller","Missing optional python module (doesn't prevent installing)") +": " + pl + ", "
if message and (not ok):
message = translate("AddonsInstaller", "Some errors were found that prevent to install this workbench") + ": <b>" + message + "</b>. "
message += translate("AddonsInstaller","Please install the missing components first.")
return ok, message
Expand Down

0 comments on commit 99e400e

Please sign in to comment.