[GRASS-SVN] r46918 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 1 09:30:39 EDT 2011
Author: martinl
Date: 2011-07-01 06:30:39 -0700 (Fri, 01 Jul 2011)
New Revision: 46918
Modified:
grass/trunk/lib/python/vector.py
Log:
pythonlib: vector_db() cast `layer` to int
Modified: grass/trunk/lib/python/vector.py
===================================================================
--- grass/trunk/lib/python/vector.py 2011-07-01 12:53:58 UTC (rev 46917)
+++ grass/trunk/lib/python/vector.py 2011-07-01 13:30:39 UTC (rev 46918)
@@ -40,15 +40,15 @@
\code
>>> grass.vector_db('lakes')
- {1: {'layer': '1', 'name': '',
+ {1: {'layer': 1, 'name': '',
'database': '/home/martin/grassdata/nc_spm_08/PERMANENT/dbf/',
'driver': 'dbf', 'key': 'cat', 'table': 'lakes'}}
\endcode
-
+
@param map vector map
- @param args
-
- @return dictionary { layer : { 'layer', 'table, 'database', 'driver', 'key' }
+ @param args other v.db.connect's arguments
+
+ @return dictionary
"""
s = read_command('v.db.connect', flags = 'g', map = map, fs = ';', **args)
result = {}
@@ -67,7 +67,7 @@
name = ''
result[int(layer)] = {
- 'layer' : layer,
+ 'layer' : int(layer),
'name' : name,
'table' : f[1],
'key' : f[2],
More information about the grass-commit
mailing list