[GRASS-dev] [GRASS GIS] #2785: pygrass util set_path bug

GRASS GIS trac at osgeo.org
Wed Oct 28 03:13:51 PDT 2015


#2785: pygrass util set_path bug
----------------------+-------------------------
 Reporter:  krejcmat  |      Owner:  grass-dev@…
     Type:  defect    |     Status:  new
 Priority:  normal    |  Milestone:
Component:  PyGRASS   |    Version:  svn-trunk
 Keywords:  path      |        CPU:  x86-64
 Platform:  Linux     |
----------------------+-------------------------
 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)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2785>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list