[GRASS-SVN] r65438 - grass/trunk/lib/python/pygrass/modules/interface

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 11 03:12:15 PDT 2015


Author: zarch
Date: 2015-06-11 03:12:15 -0700 (Thu, 11 Jun 2015)
New Revision: 65438

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/env.py
Log:
pygrass: Remove dictionary comprehension for backward compatibility with python2.6

Modified: grass/trunk/lib/python/pygrass/modules/interface/env.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/env.py	2015-06-10 19:17:13 UTC (rev 65437)
+++ grass/trunk/lib/python/pygrass/modules/interface/env.py	2015-06-11 10:12:15 UTC (rev 65438)
@@ -15,8 +15,8 @@
     if gisrc is None:
         raise RuntimeError('You are not in a GRASS session, GISRC not found.')
     with open(gisrc, mode='r') as grc:
-        env = {k.strip(): v.strip() for k, v in [row.split(':')
-                                                 for row in grc if row]}
+        env = dict([(k.strip(), v.strip())
+                    for k, v in [row.split(':') for row in grc if row]])
     return env
 
 



More information about the grass-commit mailing list