Explorar o código

pygrass modules: Fixed https://trac.osgeo.org/grass/ticket/2731 reading gisrc with multiple : in an entry caused problems (trunk, https://trac.osgeo.org/grass/changeset/66061)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66106 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler %!s(int64=9) %!d(string=hai) anos
pai
achega
b886121939
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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