[GRASS-SVN] r70968 - grass/trunk/temporal/t.list

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 27 14:27:31 PDT 2017


Author: huhabla
Date: 2017-04-27 14:27:31 -0700 (Thu, 27 Apr 2017)
New Revision: 70968

Modified:
   grass/trunk/temporal/t.list/t.list.py
Log:
temporal modules: Fixed output file generation bug in t.list reported in #3316  


Modified: grass/trunk/temporal/t.list/t.list.py
===================================================================
--- grass/trunk/temporal/t.list/t.list.py	2017-04-27 21:03:53 UTC (rev 70967)
+++ grass/trunk/temporal/t.list/t.list.py	2017-04-27 21:27:31 UTC (rev 70968)
@@ -2,15 +2,15 @@
 # -*- coding: utf-8 -*-
 ############################################################################
 #
-# MODULE:	t.list
-# AUTHOR(S):	Soeren Gebbert
+# MODULE: t.list
+# AUTHOR(S): Soeren Gebbert
 #
-# PURPOSE:	List space time datasets and maps registered in the temporal database
-# COPYRIGHT:	(C) 2011-2014, Soeren Gebbert and the GRASS Development Team
+# PURPOSE: List space time datasets and maps registered in the temporal database
+# COPYRIGHT: (C) 2011-2014, Soeren Gebbert and the GRASS Development Team
 #
-#		This program is free software under the GNU General Public
-#		License (version 2). Read the file COPYING that comes with GRASS
-#		for details.
+# This program is free software under the GNU General Public
+# License (version 2). Read the file COPYING that comes with GRASS
+# for details.
 #
 #############################################################################
 
@@ -113,6 +113,9 @@
     if  gscript.verbosity() > 0 and not outpath:
         sys.stderr.write("----------------------------------------------\n")
 
+    if outpath:
+        outfile = open(outpath, 'w')
+
     for ttype in temporal_type.split(","):
         if ttype == "absolute":
             time = "absolute time"
@@ -125,9 +128,6 @@
         # alphabetic ordering
         mapsets = tgis.get_tgis_c_library_interface().available_mapsets()
 
-        if outpath:
-            outfile = open(outpath, 'w')
-
         # Print for each mapset separately
         for key in mapsets:
             if key in stds_list.keys():



More information about the grass-commit mailing list