[GRASS-SVN] r67409 - grass/branches/releasebranch_7_0/scripts/v.rast.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 29 01:19:01 PST 2015
Author: martinl
Date: 2015-12-29 01:19:01 -0800 (Tue, 29 Dec 2015)
New Revision: 67409
Modified:
grass/branches/releasebranch_7_0/scripts/v.rast.stats/v.rast.stats.py
Log:
v.rast.stats and mySQL (#2759)
(merge r67371 from trunk)
Modified: grass/branches/releasebranch_7_0/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.rast.stats/v.rast.stats.py 2015-12-29 09:18:32 UTC (rev 67408)
+++ grass/branches/releasebranch_7_0/scripts/v.rast.stats/v.rast.stats.py 2015-12-29 09:19:01 UTC (rev 67409)
@@ -251,8 +251,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