[GRASS-SVN] r73155 - grass-addons/grass7/vector/v.rast.bufferstats

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 24 00:55:56 PDT 2018


Author: sbl
Date: 2018-08-24 00:55:55 -0700 (Fri, 24 Aug 2018)
New Revision: 73155

Modified:
   grass-addons/grass7/vector/v.rast.bufferstats/v.rast.bufferstats.py
Log:
v.rast.bufferstats: write history only if map is modified

Modified: grass-addons/grass7/vector/v.rast.bufferstats/v.rast.bufferstats.py
===================================================================
--- grass-addons/grass7/vector/v.rast.bufferstats/v.rast.bufferstats.py	2018-08-24 03:45:40 UTC (rev 73154)
+++ grass-addons/grass7/vector/v.rast.bufferstats/v.rast.bufferstats.py	2018-08-24 07:55:55 UTC (rev 73155)
@@ -599,18 +599,16 @@
             conn.commit()
 
     # Close cursor and DB connection
-    if not output:
+    if not output and not output == "-":
         cur.close()
         conn.close()
+        # Update history
+        grass.vector.vector_history(in_vector)
     elif output != "-":
         # write results to file
         out.close()
-    elif output and output == "-":
-        # write results to STDOUT
-        pass
 
-
-    grass.vector.vector_history(in_vector)
+    # Clean up
     cleanup()
 
 # Run the module



More information about the grass-commit mailing list