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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 15 02:51:43 PDT 2018


Author: martinl
Date: 2018-08-15 02:51:43 -0700 (Wed, 15 Aug 2018)
New Revision: 73105

Modified:
   grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py
Log:
i.sentinel.import: -p -> discared stderr for r.in.gdal -j

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	2018-08-15 09:41:22 UTC (rev 73104)
+++ grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py	2018-08-15 09:51:43 UTC (rev 73105)
@@ -107,8 +107,9 @@
 
     def _check_projection(self, filename):
         try:
-            gs.run_command('r.in.gdal', flags='j',
-                           input=filename, quiet=True)
+            with open(os.devnull) as null:
+                gs.run_command('r.in.gdal', flags='j',
+                               input=filename, quiet=True, stderr=null)
         except CalledModuleError as e:
             return False
 



More information about the grass-commit mailing list