[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/exportimport/cachingpolicymgr.py Protect against missing caching_policy_manager tool
Hanno Schlichting
hannosch at hannosch.eu
Fri May 8 15:45:45 EDT 2009
Log message for revision 99809:
Protect against missing caching_policy_manager tool
Changed:
U Products.CMFCore/trunk/Products/CMFCore/exportimport/cachingpolicymgr.py
-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/exportimport/cachingpolicymgr.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/exportimport/cachingpolicymgr.py 2009-05-08 15:59:05 UTC (rev 99808)
+++ Products.CMFCore/trunk/Products/CMFCore/exportimport/cachingpolicymgr.py 2009-05-08 19:45:45 UTC (rev 99809)
@@ -173,9 +173,10 @@
"""Import caching policy manager settings from an XML file.
"""
site = context.getSite()
- tool = getToolByName(site, 'caching_policy_manager')
+ tool = getToolByName(site, 'caching_policy_manager', None)
- importObjects(tool, '', context)
+ if tool is not None:
+ importObjects(tool, '', context)
def exportCachingPolicyManager(context):
"""Export caching policy manager settings as an XML file.
More information about the Checkins
mailing list