[GRASS-SVN] r50066 - grass/branches/develbranch_6/gui/wxpython/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 4 12:30:32 EST 2012


Author: martinl
Date: 2012-01-04 09:30:32 -0800 (Wed, 04 Jan 2012)
New Revision: 50066

Modified:
   grass/branches/develbranch_6/gui/wxpython/modules/extensions.py
Log:
wxGUI/extension: don't fail when `g.extension` fails


Modified: grass/branches/develbranch_6/gui/wxpython/modules/extensions.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/modules/extensions.py	2012-01-04 17:23:13 UTC (rev 50065)
+++ grass/branches/develbranch_6/gui/wxpython/modules/extensions.py	2012-01-04 17:30:32 UTC (rev 50066)
@@ -227,7 +227,7 @@
             return
         
         name = self.tree.GetItemText(item)
-        globalvar.grassCmd['all'].append(name)
+        globalvar.grassCmd['all'].add(name)
         
     def OnItemSelected(self, event):
         """!Item selected"""
@@ -325,7 +325,10 @@
         mdict = dict()
         for line in ret.splitlines():
             if full:
-                key, value = line.split('=', 1)
+                try:
+                    key, value = line.split('=', 1)
+                except ValueError:
+                    continue
                 if key == 'name':
                     try:
                         prefix, name = value.split('.', 1)



More information about the grass-commit mailing list