Opened 8 years ago

Closed 8 years ago

#2785 closed defect (fixed)

pygrass util set_path bug

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 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)

Attachments (1)

set_path.diff (560 bytes ) - added by krejcmat 8 years ago.
diff with fixed bug

Download all attachments as: .zip

Change History (6)

comment:1 by martinl, 8 years ago

Description: modified (diff)
Milestone: 7.0.1

comment:2 by martinl, 8 years ago

Milestone: 7.0.17.0.2

comment:3 by martinl, 8 years ago

Please attach diff as the attachment.

comment:4 by martinl, 8 years ago

Description: modified (diff)

by krejcmat, 8 years ago

Attachment: set_path.diff added

diff with fixed bug

comment:5 by martinl, 8 years ago

Resolution: fixed
Status: newclosed

Done in r66637, backported to relbr70 as r66638

Note: See TracTickets for help on using tickets.