Преглед изворни кода

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

Anna Petrasova пре 5 година
родитељ
комит
e89cd8c4a3
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("'"):