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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 15 23:50:38 PDT 2018


Author: martinl
Date: 2018-08-15 23:50:38 -0700 (Wed, 15 Aug 2018)
New Revision: 73108

Modified:
   grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py
Log:
i.sentinel.import: reorder variables to avoid no attribute '_dir_list'

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-16 06:46:12 UTC (rev 73107)
+++ grass-addons/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py	2018-08-16 06:50:38 UTC (rev 73108)
@@ -60,13 +60,14 @@
 
 class SentinelImporter(object):
     def __init__(self, input_dir):
+        # list of directories to cleanup
+        self._dir_list = []
+
+        # check if input dir exists
+        self.input_dir = input_dir
         if not os.path.exists(input_dir):
             gs.fatal(_('{} not exists').format(input_dir))
-        self.input_dir = input_dir
 
-        # list of directories to cleanup
-        self._dir_list = []
-
     def __del__(self):
         for dirname in self._dir_list:
             dirpath = os.path.join(self.input_dir, dirname)



More information about the grass-commit mailing list