125 |
|
|
126 |
self.UnsetModified() |
self.UnsetModified() |
127 |
|
|
|
def __getattr__(self, attr): |
|
|
"""Access to some attributes for backwards compatibility |
|
|
|
|
|
The attributes implemented here are now held by the shapestore |
|
|
if at all. For backwards compatibility pretend that they are |
|
|
still there but issue a DeprecationWarning when they are |
|
|
accessed. |
|
|
""" |
|
|
if attr in ("table", "shapetable"): |
|
|
value = self.store.Table() |
|
|
elif attr == "shapefile": |
|
|
value = self.store.Shapefile() |
|
|
elif attr == "filename": |
|
|
value = self.store.FileName() |
|
|
else: |
|
|
raise AttributeError, attr |
|
|
warnings.warn("The Layer attribute %r is deprecated." |
|
|
" It's value can be accessed through the shapestore" |
|
|
% attr, DeprecationWarning, stacklevel = 2) |
|
|
return value |
|
|
|
|
128 |
def SetShapeStore(self, store): |
def SetShapeStore(self, store): |
129 |
# Set the classification to None if there is a classification |
# Set the classification to None if there is a classification |
130 |
# and the new shapestore doesn't have a table with a suitable |
# and the new shapestore doesn't have a table with a suitable |