[GRASS-SVN] r67371 - grass/trunk/scripts/v.rast.stats

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 24 08:56:19 PST 2015


Author: martinl
Date: 2015-12-24 08:56:19 -0800 (Thu, 24 Dec 2015)
New Revision: 67371

Modified:
   grass/trunk/scripts/v.rast.stats/v.rast.stats.py
Log:
v.rast.stats and mySQL (#2759)


Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2015-12-24 16:55:49 UTC (rev 67370)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2015-12-24 16:56:19 UTC (rev 67371)
@@ -250,8 +250,7 @@
 
     first_line = 1
 
-    if not dbfdriver:
-        f.write("BEGIN TRANSACTION\n")
+    f.write("{}\n".format(grass.db_begin_transaction(fi['driver'])))
     for line in p.stdout:
         if first_line:
             first_line = 0
@@ -278,8 +277,7 @@
             f.write(" %s=%s" % (colname, value))
 
         f.write(" WHERE %s=%s;\n" % (fi['key'], vars[0]))
-    if not dbfdriver:
-        f.write("COMMIT\n")
+    f.write("{}\n".format(grass.db_commit_transaction(fi['driver'])))
     p.wait()
     f.close()
 



More information about the grass-commit mailing list