[GRASS-SVN] r58332 - grass/trunk/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 29 05:58:05 PST 2013
Author: martinl
Date: 2013-11-29 05:58:05 -0800 (Fri, 29 Nov 2013)
New Revision: 58332
Modified:
grass/trunk/gui/wxpython/core/globalvar.py
Log:
wxGUI: check if addons are in the path
Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py 2013-11-29 13:29:45 UTC (rev 58331)
+++ grass/trunk/gui/wxpython/core/globalvar.py 2013-11-29 13:58:05 UTC (rev 58332)
@@ -162,9 +162,15 @@
Debug.msg(1, "Number of removed AddOn commands: %d", len(eList))
nCmd = 0
+ pathList = os.getenv('PATH', '').split(os.pathsep)
for path in addonPath.split(os.pathsep):
if not os.path.exists(path) or not os.path.isdir(path):
continue
+
+ # check if addon is in the path
+ if pathList and path not in pathList:
+ os.environ['PATH'] = path + os.pathsep + os.environ['PATH']
+
for fname in os.listdir(path):
if fname in ['docs', 'modules.xml']:
continue
More information about the grass-commit
mailing list