[GRASS-SVN] r66469 - grass/trunk/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 11 23:18:14 PDT 2015
Author: zarch
Date: 2015-10-11 23:18:14 -0700 (Sun, 11 Oct 2015)
New Revision: 66469
Modified:
grass/trunk/lib/python/pygrass/vector/table.py
Log:
pygrass: Table.execute add values in the exception message
Modified: grass/trunk/lib/python/pygrass/vector/table.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/table.py 2015-10-11 04:19:52 UTC (rev 66468)
+++ grass/trunk/lib/python/pygrass/vector/table.py 2015-10-12 06:18:14 UTC (rev 66469)
@@ -1074,9 +1074,10 @@
if many and values:
return cur.executemany(sqlc, values)
return cur.execute(sqlc)
- except Exception, e:
- #import ipdb; ipdb.set_trace()
- raise ValueError("The SQL is not correct:\n%r, SQL error: %s" % (sqlc, str(e)))
+ except Exception as exc:
+ raise ValueError("The SQL is not correct:\n%r,\n"
+ "values: %r,\n"
+ "SQL error: %s" % (sqlc, values, str(exc)))
def exist(self, cursor=None):
"""Return True if the table already exist in the DB, False otherwise
More information about the grass-commit
mailing list