[GRASS-SVN] r64293 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 24 06:41:03 PST 2015


Author: annakrat
Date: 2015-01-24 06:41:03 -0800 (Sat, 24 Jan 2015)
New Revision: 64293

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI/forms: avoid illegal name warning when parsing input of g.copy, for example g.copy raster=elevation,elevation2

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2015-01-24 14:12:04 UTC (rev 64292)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2015-01-24 14:41:03 UTC (rev 64293)
@@ -2379,16 +2379,18 @@
                         else:
                             continue
                     
-                    element = self.grass_task.get_param(key, raiseError = False)
-                    if not element:
+                    task = self.grass_task.get_param(key, raiseError = False)
+                    if not task:
                         err.append(_("%(cmd)s: parameter '%(key)s' not available") % \
                                        { 'cmd' : cmd[0],
                                          'key' : key })
                         continue
-                    multiple = element['multiple']
-                    element = element['element']
+                    multiple = task['multiple']
+                    element = task['element']
+                    # to filter out g.copy, g.rename
+                    key_desc = task['key_desc']
                     # do we need to find mapset for each of multiple maps?
-                    if element in ['cell', 'vector'] and not multiple:
+                    if element in ['cell', 'vector'] and not multiple and len(key_desc) != 2:
                         # mapname -> mapname at mapset
                         try:
                             name, mapset = value.split('@')



More information about the grass-commit mailing list