[CMF-checkins] SVN: CMF/branches/1.5/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:00 EDT 2005
    
    
  
Log message for revision 39472:
  don't fail if caching_policy_manager doesn't exist
  
  
Changed:
  U   CMF/branches/1.5/CMFSetup/cachingpolicymgr.py
-=-
Modified: CMF/branches/1.5/CMFSetup/cachingpolicymgr.py
===================================================================
--- CMF/branches/1.5/CMFSetup/cachingpolicymgr.py	2005-10-16 16:17:03 UTC (rev 39471)
+++ CMF/branches/1.5/CMFSetup/cachingpolicymgr.py	2005-10-16 16:35:59 UTC (rev 39472)
@@ -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