浏览代码

pygrass util set_path bug (https://trac.osgeo.org/grass/ticket/2785)
(merge https://trac.osgeo.org/grass/changeset/66637 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66638 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 9 年之前
父节点
当前提交
fce546813a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/python/pygrass/utils.py

+ 1 - 1
lib/python/pygrass/utils.py

@@ -292,7 +292,7 @@ def set_path(modulename, dirname, path='.'):
     pathlib = os.path.join(path, dirname)
     if os.path.exists(pathlib):
         # we are running the script from the script directory
-        sys.path.append(os.path.abspath(path))
+        sys.path.append(os.path.abspath(pathlib))
     else:
         # running from GRASS GIS session
         from grass.pygrass.utils import get_lib_path