[GRASS-SVN] r31261 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 5 16:34:12 EDT 2008
Author: martinl
Date: 2008-05-05 16:34:12 -0400 (Mon, 05 May 2008)
New Revision: 31261
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: loading/saving workspace fix (too many values to unpack) [sync'ed with develbr6]
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-05-05 20:28:55 UTC (rev 31260)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-05-05 20:34:12 UTC (rev 31261)
@@ -1398,13 +1398,13 @@
cmd_validated.append(option)
else: # parameter
try:
- key, value = option.split('=')
+ key, value = option.split('=', 1)
except:
if i == 0: # add key name of first parameter if not given
key = self.grass_task.firstParam
value = option
else:
- raise ValueError, _("Unable to parse command %s") % ''.join(cmd)
+ raise ValueError, _("Unable to parse command %s") % ' '.join(cmd)
if self.grass_task.get_param(key)['element'] in ['cell', 'vector']:
# mapname -> mapname at mapset
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2008-05-05 20:28:55 UTC (rev 31260)
+++ grass/trunk/gui/wxpython/wxgui.py 2008-05-05 20:34:12 UTC (rev 31261)
@@ -838,7 +838,7 @@
file.write('%s<flag name="%s" />\n' %
(' ' * self.indent, option[1]))
else: # parameter
- key, value = option.split('=')
+ key, value = option.split('=', 1)
file.write('%s<parameter name="%s">\n' %
(' ' * self.indent, key))
self.indent += 4
@@ -917,8 +917,10 @@
del self.indent
except StandardError, e:
file.close()
- wx.MessageBox(parent=self, message=_("Writing current settings to workspace file failed (%s)." % e),
- caption=_("Error"), style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+ wx.MessageBox(parent=self,
+ message=_("Writing current settings to workspace file failed (%s)." % e),
+ caption=_("Error"),
+ style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
return False
file.close()
More information about the grass-commit
mailing list