Opened 9 years ago

Last modified 9 years ago

#2785 closed defect

pygrass util set_path bug — at Version 1

Reported by: krejcmat Owned by: grass-dev@…
Priority: normal Milestone: 7.0.2
Component: PyGRASS Version: svn-trunk
Keywords: path Cc:
CPU: x86-64 Platform: Linux

Description (last modified by martinl)

Hi, The current code doesn't count with parameters of the function "from grass.pygrass.utils import set_path". Diff[1] is below.

thanks Matej

[1]
Index: lib/python/pygrass/utils.py
===================================================================
--- lib/python/pygrass/utils.py	(revision 66629)
+++ lib/python/pygrass/utils.py	(working copy)
@@ -313,7 +313,7 @@
     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
         path = get_lib_path(modulename, dirname)

Change History (1)

comment:1 by martinl, 9 years ago

Description: modified (diff)
Milestone: 7.0.1
Note: See TracTickets for help on using tickets.