[GRASS-SVN] r51684 - in grass-addons/grass7/raster/r.modis: r.modis.download r.modis.import

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 23 12:54:32 EDT 2012


Author: lucadelu
Date: 2012-05-23 09:54:31 -0700 (Wed, 23 May 2012)
New Revision: 51684

Modified:
   grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py
   grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
Log:
fix os.path.isdir with new python

Modified: grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py	2012-05-23 16:42:31 UTC (rev 51683)
+++ grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py	2012-05-23 16:54:31 UTC (rev 51684)
@@ -82,10 +82,10 @@
 import grass.script as grass
 
 # add the folder containing libraries to python path
-if os.path.isdir(os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis')):
-    libmodis = os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis')
-elif os.path.isdir(os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis')):
-    libmodis = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis')
+if os.path.isdir(os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis',os.sep)):
+    libmodis = os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis',os.sep)
+elif os.path.isdir(os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis',os.sep)):
+    libmodis = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis',os.sep)
 else:
     print "ERROR: path to libraries not found"
     sys.exit()

Modified: grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2012-05-23 16:42:31 UTC (rev 51683)
+++ grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2012-05-23 16:54:31 UTC (rev 51684)
@@ -93,10 +93,10 @@
 
 
 # add the folder containing libraries to python path
-if os.path.isdir(os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis')):
-    libmodis = os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis')
-elif os.path.isdir(os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis')):
-    libmodis = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis')
+if os.path.isdir(os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis',os.sep)):
+    libmodis = os.path.join(os.getenv('GISBASE'), 'etc', 'r.modis',os.sep)
+elif os.path.isdir(os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis',os.sep)):
+    libmodis = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'etc', 'r.modis',os.sep)
 else:
     print "ERROR: path to libraries not found"
     sys.exit()



More information about the grass-commit mailing list