Skip to content

Commit

Permalink
gui: toolboxes2menudata skips uncompiled modules (#3628)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho committed Apr 19, 2024
1 parent 5904265 commit 112dd97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gui/wxpython/core/toolboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os
import sys
import copy
import shutil
import xml.etree.ElementTree as etree
from xml.parsers import expat

Expand Down Expand Up @@ -591,15 +592,19 @@ def _expandRuntimeModules(node, loadMetadata=True):

if module.find("description") is None:
if loadMetadata:
desc, keywords = _loadMetadata(name)
# not all modules are always compiled (e.g., r.in.lidar)
if shutil.which(name):
desc, keywords = _loadMetadata(name)
if not desc:
hasErrors = True
else:
desc, keywords = _("Module not installed"), ""
else:
desc, keywords = "", ""
n = etree.SubElement(module, "description")
n.text = _escapeXML(desc)
n = etree.SubElement(module, "keywords")
n.text = _escapeXML(",".join(keywords))
if loadMetadata and not desc:
hasErrors = True

if hasErrors:
# not translatable until toolboxes compilation on Mac is fixed
Expand Down

0 comments on commit 112dd97

Please sign in to comment.