浏览代码

grass.py: Match.__getitem__ is new from version 3.6, we need to use group()

Anna Petrasova 5 年之前
父节点
当前提交
dc976cf6ab
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/init/grass.py

+ 2 - 2
lib/init/grass.py

@@ -1173,8 +1173,8 @@ def load_env(grass_env_file):
             continue
 
         # k is the variable name and v is its value
-        k = m[1]
-        v = m[2]
+        k = m.group(1)
+        v = m.group(2)
         # let's try to expand any $var's in v
         expand = True
         if v.startswith("'") and v.endswith("'"):