[GRASS-SVN] r60639 - grass/trunk/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 31 08:13:53 PDT 2014
Author: hcho
Date: 2014-05-31 08:13:53 -0700 (Sat, 31 May 2014)
New Revision: 60639
Modified:
grass/trunk/gui/wxpython/core/gcmd.py
Log:
gcmd.py: too many values to unpack error fixed. <> escaped
Modified: grass/trunk/gui/wxpython/core/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/core/gcmd.py 2014-05-31 14:48:32 UTC (rev 60638)
+++ grass/trunk/gui/wxpython/core/gcmd.py 2014-05-31 15:13:53 UTC (rev 60639)
@@ -171,17 +171,18 @@
# The Windows shell (cmd.exe) requires some special characters to
# be escaped by preceding them with 3 carets (^^^). cmd.exe /?
- # mentions <space> and &()[]{}^=;!'+,`~. The vertical bar (|)
- # should also be included. A quick test revealed that only ^|& need
- # to be escaped.
+ # mentions <space> and &()[]{}^=;!'+,`~. A quick test revealed that
+ # only ^|&<> need to be escaped. A single quote can be escaped by
+ # enclosing it with double quotes and vice versa.
for i in range(2, len(args)):
# "^" must be the first character in the list to avoid double
# escaping.
- for c in ("^", "|", "&"):
+ for c in ("^", "|", "&", "<", ">"):
if c in args[i]:
if "=" in args[i]:
- k, v = args[i].split("=")
- k = k + "="
+ a = args[i].split("=")
+ k = a[0] + "="
+ v = "=".join(a[1:len(a)])
else:
k = ""
v = args[i]
More information about the grass-commit
mailing list