[GRASS-SVN] r54912 - grass/trunk/lib/python/pygrass/vector

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 5 00:19:27 PST 2013


Author: zarch
Date: 2013-02-05 00:19:26 -0800 (Tue, 05 Feb 2013)
New Revision: 54912

Modified:
   grass/trunk/lib/python/pygrass/vector/geometry.py
Log:
Fix update method in the Attrs class

Modified: grass/trunk/lib/python/pygrass/vector/geometry.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/geometry.py	2013-02-05 08:19:17 UTC (rev 54911)
+++ grass/trunk/lib/python/pygrass/vector/geometry.py	2013-02-05 08:19:26 UTC (rev 54912)
@@ -143,9 +143,9 @@
         .."""
         if self.writable:
             #UPDATE {tname} SET {new_col} = {old_col} WHERE {condition}
+            values = '%s=%r' % (key, value)
             self.table.execute(sql.UPDATE_WHERE.format(tname=self.table.name,
-                                                       new_col=key,
-                                                       old_col=repr(value),
+                                                       values=values,
                                                        condition=self.cond))
             #self.table.conn.commit()
         else:



More information about the grass-commit mailing list