Skip to content

Commit

Permalink
Merge pull request #29 from XLTechie/fixSconstructForNoTranslations
Browse files Browse the repository at this point in the history
Fix-up of #28 to handle the situation when there are no existing translations.
  • Loading branch information
josephsl authored Jun 10, 2023
2 parents eb8e32a + 6663b5c commit 910f6ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ for file in pythonFiles:
createAddonHelp("addon")
for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
htmlFile = env.markdown(mdFile)
env.Depends(htmlFile, [mdFile, moFile])
try: # It is possible that no moFile was set, because an add-on has no translations.
moFile
except NameError: # Runs if there is no moFile
env.Depends(htmlFile, mdFile)
else: # Runs if there is a moFile
env.Depends(htmlFile, [mdFile, moFile])
env.Depends(addon, htmlFile)

# Pot target
Expand Down

0 comments on commit 910f6ac

Please sign in to comment.