[CMF-checkins] SVN: CMF/trunk/CMFSetup/cachingpolicymgr.py don't fail if caching_policy_manager doesn't exist

Yvo Schubbe y.2005- at wcm-solutions.de
Sun Oct 16 12:36:26 EDT 2005


Log message for revision 39473:
  don't fail if caching_policy_manager doesn't exist

Changed:
  U   CMF/trunk/CMFSetup/cachingpolicymgr.py

-=-
Modified: CMF/trunk/CMFSetup/cachingpolicymgr.py
===================================================================
--- CMF/trunk/CMFSetup/cachingpolicymgr.py	2005-10-16 16:35:59 UTC (rev 39472)
+++ CMF/trunk/CMFSetup/cachingpolicymgr.py	2005-10-16 16:36:25 UTC (rev 39473)
@@ -63,6 +63,11 @@
     """ Export caching policy manager settings as an XML file.
     """
     site = context.getSite()
+
+    cptool = getToolByName(site, 'caching_policy_manager', None)
+    if cptool is None:
+        return 'Caching policy manager: Nothing to export.'
+
     mhc = CachingPolicyManagerExportConfigurator( site ).__of__( site )
     text = mhc.generateXML()
 
@@ -70,6 +75,7 @@
 
     return 'Caching policy manager settings exported.'
 
+
 class CachingPolicyManagerExportConfigurator(ExportConfiguratorBase):
     """ Synthesize XML description of cc properties.
     """



More information about the CMF-checkins mailing list