[GRASS-dev] bug in python version of v.db.renamecol / db_describe ?
Moritz Lennert
mlennert at club.worldonline.be
Tue Nov 18 10:39:53 EST 2008
Glynn,
Trying to debug the v.db.renamecol bash version, I also tried with the
python version and it seems there is a bug, which IIUC should be fixed
by the following patch. Can you confirm or do I misunderstand how
db_describe works ?
--- SRC/GRASS/grass_trunk/scripts/v.db.renamecol/v.db.renamecol.py
2008-10-22 10:54:59.000000000 +0200
+++ SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/scripts/v.db.renamecol
2008-11-18 16:37:03.000000000 +0100
@@ -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]
Just not familiar enough with the python lib, yet, to feel comfortable
committing myself.
Moritz
More information about the grass-dev
mailing list