[GRASS-SVN] r69998 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 4 14:46:06 PST 2016


Author: martinl
Date: 2016-12-04 14:46:06 -0800 (Sun, 04 Dec 2016)
New Revision: 69998

Modified:
   grass/trunk/lib/python/temporal/mapcalc.py
Log:
libtemporal: simplify percent() calls in dataset_mapcalculator()

Modified: grass/trunk/lib/python/temporal/mapcalc.py
===================================================================
--- grass/trunk/lib/python/temporal/mapcalc.py	2016-12-04 19:50:12 UTC (rev 69997)
+++ grass/trunk/lib/python/temporal/mapcalc.py	2016-12-04 22:46:06 UTC (rev 69998)
@@ -200,8 +200,7 @@
         for i in range(num):
 
             count += 1
-            if count % 10 == 0:
-                msgr.percent(count, num, 1)
+            msgr.percent(count, num, 10)
 
             # Create the r.mapcalc statement for the current time step
             map_name = "{base}_{suffix}".format(base=base,
@@ -298,8 +297,7 @@
         for new_map in map_list:
 
             count += 1
-            if count % 10 == 0:
-                msgr.percent(count, num, 1)
+            msgr.percent(count, num, 10)
 
             # Read the map data
             new_map.load()
@@ -319,8 +317,6 @@
         # Update the spatio-temporal extent and the metadata table entries
         new_sp.update_from_registered_maps(dbif)
 
-        msgr.percent(1, 1, 1)
-
         # Remove empty maps
         if len(empty_maps) > 0:
             names = ""



More information about the grass-commit mailing list