[GRASS-SVN] r64532 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 9 08:39:33 PST 2015


Author: martinl
Date: 2015-02-09 08:39:33 -0800 (Mon, 09 Feb 2015)
New Revision: 64532

Modified:
   grass/trunk/gui/wxpython/core/toolboxes.py
Log:
wxGUI: add message when some addons failed, suggest solution to the user

Modified: grass/trunk/gui/wxpython/core/toolboxes.py
===================================================================
--- grass/trunk/gui/wxpython/core/toolboxes.py	2015-02-09 15:09:02 UTC (rev 64531)
+++ grass/trunk/gui/wxpython/core/toolboxes.py	2015-02-09 16:39:33 UTC (rev 64532)
@@ -504,6 +504,7 @@
     >>> etree.tostring(tree)
     '<items><module-item name="m.proj"><module>m.proj</module><description>Converts coordinates from one projection to another (cs2cs frontend).</description><keywords>miscellaneous,projection</keywords></module-item></items>'
     """
+    hasErrors = False
     modules = node.findall('.//module-item')
     for module in modules:
         name = module.get('name')
@@ -517,8 +518,13 @@
             n.text = _escapeXML(desc)
             n = etree.SubElement(parent=module, tag='keywords')
             n.text = _escapeXML(','.join(keywords))
-
-
+            if not desc:
+                hasErrors = True
+    
+    if hasErrors:
+        sys.stderr.write(_("WARNING: Some addons failed when loading. "
+                           "Please consider to update your addons by running 'g.extension.all -f'.\n"))
+    
 def _escapeXML(text):
     """Helper function for correct escaping characters for XML.
 



More information about the grass-commit mailing list