[GRASS-SVN] r66630 - grass-addons/grass7/raster/r.modis/libmodis
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 28 01:42:39 PDT 2015
Author: lucadelu
Date: 2015-10-28 01:42:39 -0700 (Wed, 28 Oct 2015)
New Revision: 66630
Modified:
grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
Log:
r.modis.import: fixed bug with PROJ_EPSG line from g.proj output
Modified: grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
===================================================================
--- grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py 2015-10-28 06:42:47 UTC (rev 66629)
+++ grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py 2015-10-28 08:42:39 UTC (rev 66630)
@@ -36,11 +36,15 @@
listproj = gproj.split('\n')
listproj.remove('-PROJ_INFO-------------------------------------------------')
listproj.remove('-PROJ_UNITS------------------------------------------------')
+ listproj.remove('-PROJ_EPSG-------------------------------------------------')
listproj.remove('')
proj = {}
for i in listproj:
- ilist = i.split(':')
- proj[ilist[0].strip()] = ilist[1].strip()
+ try:
+ ilist = i.split(':')
+ proj[ilist[0].strip()] = ilist[1].strip()
+ except IndexError:
+ continue
proj.update(grass.parse_command('g.proj', flags='j'))
return proj
elif flag == 'w':
More information about the grass-commit
mailing list