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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 13 02:29:16 PDT 2013


Author: zarch
Date: 2013-03-13 02:29:13 -0700 (Wed, 13 Mar 2013)
New Revision: 55348

Modified:
   grass/trunk/lib/python/pygrass/vector/abstract.py
Log:
Fix table creation

Modified: grass/trunk/lib/python/pygrass/vector/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/abstract.py	2013-03-13 08:56:04 UTC (rev 55347)
+++ grass/trunk/lib/python/pygrass/vector/abstract.py	2013-03-13 09:29:13 UTC (rev 55348)
@@ -337,8 +337,8 @@
                 # add the new link
                 self.dblinks.add(link)
                 # create the table
-                table = self.get_table()
-                table.columns.create(tab_cols)
+                table = link.table()
+                table.create(tab_cols)
                 table.conn.commit()
 
         # check the C function result.
@@ -351,7 +351,7 @@
             self.table = None
             self.n_lines = 0
         else:
-            self.layer = self.dblinks.by_layer(layer)
+            self.layer = self.dblinks.by_layer(layer).layer
             self.table = self.dblinks.by_layer(layer).table()
             self.n_lines = self.table.n_rows()
         self.writable = self.mapset == functions.getenv("MAPSET")



More information about the grass-commit mailing list