[GRASS-SVN] r51701 - grass-addons/grass7/general/g.cloud

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 24 07:11:42 EDT 2012


Author: neteler
Date: 2012-05-24 04:11:42 -0700 (Thu, 24 May 2012)
New Revision: 51701

Modified:
   grass-addons/grass7/general/g.cloud/g.cloud.py
Log:
fix install path (from r.modis)

Modified: grass-addons/grass7/general/g.cloud/g.cloud.py
===================================================================
--- grass-addons/grass7/general/g.cloud/g.cloud.py	2012-05-24 10:56:36 UTC (rev 51700)
+++ grass-addons/grass7/general/g.cloud/g.cloud.py	2012-05-24 11:11:42 UTC (rev 51701)
@@ -111,8 +111,14 @@
 from types import *
 import grass.script as grass
 
+# add the folder containing libraries to python path
+if os.path.isdir(os.path.join(os.getenv('GISBASE'), 'etc', 'g.cloud', os.sep)):
+    cloudpath = os.path.join(os.getenv('GISBASE'), 'etc', 'g.cloud')
+elif os.path.isdir(os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'g.cloud', os.sep)):
+    cloudpath = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'g.cloud')
+
+# search python environment
 python = os.getenv('GRASS_PYTHON', 'python')
-cloudpath = os.path.join(os.getenv('GISBASE'), 'etc', 'g.cloud')
 sys.path.append(cloudpath)
 
 try:



More information about the grass-commit mailing list