[GRASS-SVN] r34374 - in grass/trunk/scripts: v.db.dropcol
v.db.renamecol
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 18 13:19:54 EST 2008
Author: glynn
Date: 2008-11-18 13:19:54 -0500 (Tue, 18 Nov 2008)
New Revision: 34374
Modified:
grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py
grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py
Log:
Correct usage of grass.db_describe()
Modified: grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py 2008-11-18 16:35:16 UTC (rev 34373)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py 2008-11-18 18:19:54 UTC (rev 34374)
@@ -85,7 +85,7 @@
# http://www.sqlite.org/faq.html#q13
colnames = []
coltypes = []
- for f in grass.db_describe(table):
+ for f in grass.db_describe(table)['cols']:
if f[0] == column:
continue
colnames.append(f[0])
Modified: grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py
===================================================================
--- grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py 2008-11-18 16:35:16 UTC (rev 34373)
+++ grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py 2008-11-18 18:19:54 UTC (rev 34374)
@@ -86,7 +86,7 @@
# describe old col
oldcoltype = None
- for f in grass.db_describe(table):
+ for f in grass.db_describe(table)['cols']:
if f[0] != oldcol:
continue
oldcoltype = f[1]
More information about the grass-commit
mailing list