[GRASS-SVN] r74344 - grass-addons/grass7/imagery/i.sentinel/i.sentinel.import

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 4 03:46:27 PDT 2019


Author: AnikaBettge
Date: 2019-04-04 03:46:27 -0700 (Thu, 04 Apr 2019)
New Revision: 74344

Modified:
   grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py
Log:
i.sentinel.import addon: fix crash with memory option when using -l flag

Modified: grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py
===================================================================
--- grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py	2019-04-04 09:58:21 UTC (rev 74343)
+++ grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py	2019-04-04 10:46:27 UTC (rev 74344)
@@ -147,7 +147,7 @@
         if link:
             module = 'r.external'
         else:
-            memory = options['memory']
+            args['memory'] = options['memory']
             if reproject:
                 module = 'r.import'
                 args['resample'] = 'bilinear'
@@ -161,7 +161,7 @@
                     gs.fatal(_('Projection of dataset does not appear to match current location. '
                                'Force reprojecting dataset by -r flag.'))
 
-            self._import_file(f, module, memory, args)
+            self._import_file(f, module, args)
 
     def _check_projection(self, filename):
         try:
@@ -201,13 +201,13 @@
 
         return ret
         
-    def _import_file(self, filename, module, memory, args):
+    def _import_file(self, filename, module, args):
         mapname = os.path.splitext(os.path.basename(filename))[0]
         gs.message(_('Processing <{}>...').format(mapname))
         if module == 'r.import':
             args['resolution_value'] = self._raster_resolution(filename)
         try:
-            gs.run_command(module, input=filename, output=mapname, memory=memory, **args)
+            gs.run_command(module, input=filename, output=mapname, **args)
             gs.raster_history(mapname)
         except CalledModuleError as e:
             pass # error already printed



More information about the grass-commit mailing list