소스 검색

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 년 전
부모
커밋
6f5417b55b
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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
 
-SUBDIRS = exceptions script ctypes temporal pygrass pydispatch imaging
+SUBDIRS = exceptions script ctypes temporal pygrass pydispatch imaging gunittest
 
 default: $(PYDIR)/__init__.py
 	$(MAKE) subdirs

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

@@ -15,8 +15,8 @@ def get_env():
     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