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

GRASS GIS trac at osgeo.org
Wed Oct 28 04:16:28 PDT 2015


#2785: pygrass util set_path bug
-----------------------+-------------------------
  Reporter:  krejcmat  |      Owner:  grass-dev@…
      Type:  defect    |     Status:  new
  Priority:  normal    |  Milestone:  7.0.1
 Component:  PyGRASS   |    Version:  svn-trunk
Resolution:            |   Keywords:  path
       CPU:  x86-64    |   Platform:  Linux
-----------------------+-------------------------
Changes (by martinl):

 * milestone:   => 7.0.1


Old description:

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

New description:

 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#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list