[GRASS-SVN] r62133 - grass/trunk/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 30 01:45:07 PDT 2014
Author: zarch
Date: 2014-09-30 01:45:07 -0700 (Tue, 30 Sep 2014)
New Revision: 62133
Modified:
grass/trunk/lib/python/pygrass/vector/abstract.py
Log:
pygrass: Fix setter function for the organization property of the Vector class, and transform the private method: _write_header to write_header (contribution: Maurizio Cingi)
Modified: grass/trunk/lib/python/pygrass/vector/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/abstract.py 2014-09-29 18:16:03 UTC (rev 62132)
+++ grass/trunk/lib/python/pygrass/vector/abstract.py 2014-09-30 08:45:07 UTC (rev 62133)
@@ -132,7 +132,7 @@
def _set_organization(self, org):
"""Private method to change the Vector organization"""
- libvect.Vect_get_organization(self.c_mapinfo, ctypes.c_char_p(org))
+ libvect.Vect_set_organization(self.c_mapinfo, ctypes.c_char_p(org))
organization = property(fget=_get_organization, fset=_set_organization,
doc="Set or obtain the Vector organization")
@@ -256,7 +256,8 @@
"""Return the project name of Vector"""
return libvect.Vect_get_proj_name(self.c_mapinfo)
- def _write_header(self):
+ def write_header(self):
+ """Save the change in the C struct permanently to disk."""
libvect.Vect_write_header(self.c_mapinfo)
def rename(self, newname):
More information about the grass-commit
mailing list