[GRASS-SVN] r46760 - grass/trunk/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 23 09:26:45 EDT 2011
Author: martinl
Date: 2011-06-23 06:26:45 -0700 (Thu, 23 Jun 2011)
New Revision: 46760
Modified:
grass/trunk/scripts/g.extension/g.extension.py
Log:
g.extension: add warning when GRASS_ADDON_PATH is not defined
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2011-06-23 12:13:23 UTC (rev 46759)
+++ grass/trunk/scripts/g.extension/g.extension.py 2011-06-23 13:26:45 UTC (rev 46760)
@@ -368,6 +368,11 @@
else:
grass.message(_("Installation of '%s' successfully finished.") % options['extension'])
+ if not os.environ.has_key('GRASS_ADDON_PATH') or \
+ not os.environ['GRASS_ADDON_PATH']:
+ grass.warning(_('This add-on module will not function until you set the '
+ 'GRASS_ADDON_PATH environment variable (see "g.manual variables")'))
+
def remove_extension():
# is module available?
if not os.path.exists(os.path.join(options['prefix'], 'bin', options['extension'])):
More information about the grass-commit
mailing list