[GRASS-SVN] r66106 - grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 4 23:40:51 PDT 2015


Author: neteler
Date: 2015-09-04 23:40:51 -0700 (Fri, 04 Sep 2015)
New Revision: 66106

Modified:
   grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/env.py
Log:
pygrass modules: Fixed #2731 reading gisrc with multiple : in an entry caused problems (trunk, r66061)

Modified: grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/env.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/env.py	2015-09-05 00:42:43 UTC (rev 66105)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/env.py	2015-09-05 06:40:51 UTC (rev 66106)
@@ -16,7 +16,7 @@
         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
 
 



More information about the grass-commit mailing list