[GRASS-SVN] r62660 - grass/branches/releasebranch_7_0/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 8 06:12:46 PST 2014
Author: martinl
Date: 2014-11-08 06:12:46 -0800 (Sat, 08 Nov 2014)
New Revision: 62660
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py
Log:
wxGUI: catch ValueError? in utils.split()
(merge r62622-3 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py 2014-11-07 20:57:20 UTC (rev 62659)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py 2014-11-08 14:12:46 UTC (rev 62660)
@@ -44,10 +44,15 @@
def split(s):
"""!Platform spefic shlex.split"""
- if sys.platform == "win32":
- return shlex.split(s.replace('\\', r'\\'))
- else:
- return shlex.split(s)
+ try:
+ if sys.platform == "win32":
+ return shlex.split(s.replace('\\', r'\\'))
+ else:
+ return shlex.split(s)
+ except ValueError as e:
+ sys.stderr.write(_("Syntax error: %s") % e)
+
+ return []
def GetTempfile(pref=None):
"""!Creates GRASS temporary file using defined prefix.
More information about the grass-commit
mailing list