浏览代码

pygrass modules: Fixed https://trac.osgeo.org/grass/ticket/2731 reading gisrc with multiple : in an entry caused problems

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@66061 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 9 年之前
父节点
当前提交
0a8c79e27c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/python/pygrass/modules/interface/env.py

+ 1 - 1
lib/python/pygrass/modules/interface/env.py

@@ -16,7 +16,7 @@ def get_env():
         raise RuntimeError('You are not in a GRASS session, GISRC not found.')
     with open(gisrc, mode='r') as grc:
         env = dict([(k.strip(), v.strip())
-                    for k, v in [row.split(':') for row in grc if row]])
+                    for k, v in [row.split(':',1) for row in grc if row]])
     return env