Sfoglia il codice sorgente

pygrass: backport https://trac.osgeo.org/grass/changeset/65438, Remove dictionary comprehension for backward compatibility with python2.6

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65439 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 10 anni fa
parent
commit
6f5417b55b
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1 1
      lib/python/Makefile
  2. 2 2
      lib/python/pygrass/modules/interface/env.py

+ 1 - 1
lib/python/Makefile

@@ -5,7 +5,7 @@ include $(MODULE_TOPDIR)/include/Make/Python.make
 
 
 PYDIR = $(ETC)/python/grass
 PYDIR = $(ETC)/python/grass
 
 
-SUBDIRS = exceptions script ctypes temporal pygrass pydispatch imaging
+SUBDIRS = exceptions script ctypes temporal pygrass pydispatch imaging gunittest
 
 
 default: $(PYDIR)/__init__.py
 default: $(PYDIR)/__init__.py
 	$(MAKE) subdirs
 	$(MAKE) subdirs

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

@@ -15,8 +15,8 @@ def get_env():
     if gisrc is None:
     if gisrc is None:
         raise RuntimeError('You are not in a GRASS session, GISRC not found.')
         raise RuntimeError('You are not in a GRASS session, GISRC not found.')
     with open(gisrc, mode='r') as grc:
     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
     return env