[GRASS-SVN] r73073 - grass-addons/grass7/imagery/i.sentinel.preproc
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 9 06:39:09 PDT 2018
Author: Robifag
Date: 2018-08-09 06:39:09 -0700 (Thu, 09 Aug 2018)
New Revision: 73073
Modified:
grass-addons/grass7/imagery/i.sentinel.preproc/i.sentinel.preproc.py
Log:
i.sentinel.preproc: fixed a bug about cross platform usability
Modified: grass-addons/grass7/imagery/i.sentinel.preproc/i.sentinel.preproc.py
===================================================================
--- grass-addons/grass7/imagery/i.sentinel.preproc/i.sentinel.preproc.py 2018-08-09 03:26:33 UTC (rev 73072)
+++ grass-addons/grass7/imagery/i.sentinel.preproc/i.sentinel.preproc.py 2018-08-09 13:39:09 UTC (rev 73073)
@@ -161,10 +161,10 @@
check_odir = 1
filename = [i for i in os.listdir(input_dir) if i.startswith("S")]
string = str(filename).strip("['']")
- mtd_file = options['input_dir'] + '/' + string
+ mtd_file = os.path.join(input_dir, string)
elif level_dir[1] == 'MSIL1C':
check_ndir = 1
- mtd_file = options['input_dir'] + '/MTD_MSIL1C.xml'
+ mtd_file = os.path.join(input_dir, 'MTD_MSIL1C.xml')
else:
gscript.fatal('The input directory does not belong to a L1C Sentinel image. Please check the input directory')
# Check if Metadata file exists
@@ -187,11 +187,11 @@
try:
if flags["r"]:
gscript.run_command('i.sentinel.import',
- input=options['input_dir'],
+ input=input_dir,
flags='r')
else:
gscript.run_command('i.sentinel.import',
- input=options['input_dir'])
+ input=input_dir)
except:
gscript.fatal('Module rquire i.sentinel.import. Please install it using g.extension.')
More information about the grass-commit
mailing list