Переглянути джерело

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("'"):