[GRASS-SVN] r55453 - grass/trunk/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 19 08:24:47 PDT 2013
Author: zarch
Date: 2013-03-19 08:24:47 -0700 (Tue, 19 Mar 2013)
New Revision: 55453
Modified:
grass/trunk/lib/python/pygrass/vector/abstract.py
Log:
Transform the method of the vector abstract class into a function
Modified: grass/trunk/lib/python/pygrass/vector/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/abstract.py 2013-03-19 15:24:39 UTC (rev 55452)
+++ grass/trunk/lib/python/pygrass/vector/abstract.py 2013-03-19 15:24:47 UTC (rev 55453)
@@ -13,6 +13,13 @@
from grass.pygrass.errors import GrassError, OpenError, must_be_open
from table import DBlinks, Link
+
+def is_open(c_mapinfo):
+ """Return if the Vector is open"""
+ return (c_mapinfo.contents.open != 0 and
+ c_mapinfo.contents.open != libvect.VECT_CLOSED_CODE)
+
+
#=============================================
# VECTOR ABSTRACT CLASS
#=============================================
@@ -259,8 +266,7 @@
def is_open(self):
"""Return if the Vector is open"""
- return (self.c_mapinfo.contents.open != 0 and
- self.c_mapinfo.contents.open != libvect.VECT_CLOSED_CODE)
+ return is_open(self.c_mapinfo)
def open(self, mode='r', layer=1, overwrite=None,
# parameters valid only if mode == 'w'
More information about the grass-commit
mailing list