[CMF-checkins] SVN: CMF/trunk/GenericSetup/content.py Allow
subclasses to override 'mandatory' items.
Tres Seaver
tseaver at palladion.com
Sun Nov 20 21:46:17 EST 2005
Log message for revision 40285:
Allow subclasses to override 'mandatory' items.
Changed:
U CMF/trunk/GenericSetup/content.py
-=-
Modified: CMF/trunk/GenericSetup/content.py
===================================================================
--- CMF/trunk/GenericSetup/content.py 2005-11-21 02:06:46 UTC (rev 40284)
+++ CMF/trunk/GenericSetup/content.py 2005-11-21 02:46:17 UTC (rev 40285)
@@ -139,8 +139,7 @@
prop_adapter.put_ini(prop_text)
preserve = import_context.readDataFile('.preserve', subdir)
- tool_items = [x for x in context.objectItems()
- if ISetupTool.providedBy(x[1])]
+ must_preserve = self._mustPreserve()
prior = context.objectIds()
@@ -149,7 +148,7 @@
else:
preserve = _globtest(preserve, prior)
- preserve.extend([x[0] for x in tool_items])
+ preserve.extend([x[0] for x in must_preserve])
for id in prior:
if id not in preserve:
@@ -224,6 +223,10 @@
context._setObject(instance_id, instance)
return context._getOb(instance_id)
+
+ def _mustPreserve(self):
+ return [x for x in self.context.objectItems()
+ if ISetupTool.providedBy(x[1])]
def _globtest(globpattern, namelist):
More information about the CMF-checkins
mailing list