[GRASS-SVN] r41460 - grass/branches/releasebranch_6_4/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 16 12:18:35 EDT 2010
Author: martinl
Date: 2010-03-16 12:18:35 -0400 (Tue, 16 Mar 2010)
New Revision: 41460
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
fix r41459
Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-03-16 16:04:03 UTC (rev 41459)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-03-16 16:18:35 UTC (rev 41460)
@@ -457,19 +457,16 @@
@todo: Handle unicode with shlex
"""
- try:
- cmdString = str(event.GetString())
- except UnicodeError:
- cmdString = event.GetString()
+ cmdString = event.GetString()
if cmdString[:2] == 'd.' and not self.curr_page:
self.NewDisplay(show=True)
-
- if isinstance(cmdString, unicode):
- cmd = cmdString.split(' ')
- else:
- cmd = shlex.split(cmdString)
+ try:
+ cmd = shlex.split(str(cmdString))
+ except UnicodeError:
+ cmd = shlex.split(utils.EncodeString((cmdString)))
+
if len(cmd) > 1:
self.goutput.RunCmd(cmd, switchPage=True)
else:
More information about the grass-commit
mailing list