浏览代码

gcmd.py: too many values to unpack error fixed. <> escaped

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60639 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 年之前
父节点
当前提交
8942005b6f
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      gui/wxpython/core/gcmd.py

+ 7 - 6
gui/wxpython/core/gcmd.py

@@ -171,17 +171,18 @@ class Popen(subprocess.Popen):
 
 
             # The Windows shell (cmd.exe) requires some special characters to
             # The Windows shell (cmd.exe) requires some special characters to
             # be escaped by preceding them with 3 carets (^^^). cmd.exe /?
             # 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)):
             for i in range(2, len(args)):
                 # "^" must be the first character in the list to avoid double
                 # "^" must be the first character in the list to avoid double
                 # escaping.
                 # escaping.
-                for c in ("^", "|", "&"):
+                for c in ("^", "|", "&", "<", ">"):
                     if c in args[i]:
                     if c in args[i]:
                         if "=" 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:
                         else:
                             k = ""
                             k = ""
                             v = args[i]
                             v = args[i]