[GRASS-SVN] r69389 - grass-addons/grass7/vector/v.class.ml

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 6 07:05:23 PDT 2016


Author: wenzeslaus
Date: 2016-09-06 07:05:23 -0700 (Tue, 06 Sep 2016)
New Revision: 69389

Modified:
   grass-addons/grass7/vector/v.class.ml/v.class.ml.py
Log:
v.class.ml: use set_path with parent dir as in r.agent instead of get_lib_path (see #2480)

Modified: grass-addons/grass7/vector/v.class.ml/v.class.ml.py
===================================================================
--- grass-addons/grass7/vector/v.class.ml/v.class.ml.py	2016-09-06 13:20:53 UTC (rev 69388)
+++ grass-addons/grass7/vector/v.class.ml/v.class.ml.py	2016-09-06 14:05:23 UTC (rev 69389)
@@ -370,19 +370,14 @@
 
 import numpy as np
 
-from grass.pygrass.utils import get_lib_path
+from grass.pygrass.utils import set_path
 from grass.pygrass.messages import get_msgr
 from grass.pygrass.vector import Vector
 from grass.pygrass.modules import Module
 from grass.script.core import parser, overwrite
 
-path = get_lib_path("v.class.ml", "")
-if path is None:
-    raise ImportError("Not able to find the path %s directory." % path)
+set_path('v.class.ml', '..')
 
-sys.path.append(path)
-
-
 from training_extraction import extract_training
 from sqlite2npy import save2npy
 from npy2table import export_results



More information about the grass-commit mailing list