[GRASS-SVN] r61640 - grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 14 13:42:48 PDT 2014
Author: martinl
Date: 2014-08-14 13:42:48 -0700 (Thu, 14 Aug 2014)
New Revision: 61640
Modified:
grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
Log:
wx.metadata: attempt to use get_lib_path
Modified: grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py 2014-08-14 19:14:53 UTC (rev 61639)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py 2014-08-14 20:42:48 UTC (rev 61640)
@@ -34,12 +34,21 @@
import os
import sys
-sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'wx.metadata'))
-from grass.script import parser
-from mdgrass import *
+from grass.script import parser, fatal
+from grass.pygrass.functions import get_lib_path
+def load_mdlib():
+ path = get_lib_path(modname='wx.metadata', libname='mdgrass')
+ if path is not None:
+ fatal("Not able to find the metadata library directory")
+ sys.path.append(path)
+ from mdgrass import *
+
def main():
+ # load metadata library
+ load_mdlib()
+
if not options['output']:
destination = None
name = None
More information about the grass-commit
mailing list