Browse Source

pygrass: fix error message when path not found

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67544 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 năm trước cách đây
mục cha
commit
f3ec8ba283
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      lib/python/pygrass/utils.py

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

@@ -328,7 +328,9 @@ def set_path(modulename, dirname=None, path='.'):
         # running from GRASS GIS session
         path = get_lib_path(modulename, dirname)
         if path is None:
-            raise ImportError("Not able to find the path %s directory." % path)
+            pathname = os.path.join(modulename, dirname) if dirname else modulename
+            raise ImportError("Not able to find the path '%s' directory "
+                              "(current dir '%s')." % (pathname, os.getcwd()))
         sys.path.append(path)