[CMF-checkins] SVN: CMF/branches/1.5/CMFDefault/ - Remove a cyclic import, while still failing if CMFTopic can't be found at startup time.

Sidnei da Silva sidnei at enfoldsystems.com
Thu Oct 20 09:17:36 EDT 2005


Log message for revision 39530:
  
  - Remove a cyclic import, while still failing if CMFTopic can't be found at startup time.
  

Changed:
  U   CMF/branches/1.5/CMFDefault/Portal.py
  U   CMF/branches/1.5/CMFDefault/__init__.py

-=-
Modified: CMF/branches/1.5/CMFDefault/Portal.py
===================================================================
--- CMF/branches/1.5/CMFDefault/Portal.py	2005-10-20 13:14:12 UTC (rev 39529)
+++ CMF/branches/1.5/CMFDefault/Portal.py	2005-10-20 13:17:36 UTC (rev 39530)
@@ -22,8 +22,6 @@
 from Products.CMFCore import PortalFolder
 from Products.CMFCore.TypesTool import FactoryTypeInformation
 from Products.CMFCore.utils import getToolByName
-from Products.CMFTopic import Topic
-from Products.CMFTopic import topic_globals
 
 from DublinCore import DefaultDublinCoreImpl
 from permissions import AccessFuturePortalContent
@@ -184,6 +182,7 @@
 
     def setupDefaultSkins(self, p):
         from Products.CMFCore.DirectoryView import addDirectoryViews
+        from Products.CMFTopic import topic_globals
         ps = getToolByName(p, 'portal_skins')
         addDirectoryViews(ps, 'skins', globals())
         addDirectoryViews(ps, 'skins', topic_globals)
@@ -246,6 +245,7 @@
         wftool.setChainForPortalTypes( ('Folder', 'Topic'), () )
 
     def setup(self, p, create_userfolder):
+        from Products.CMFTopic import Topic
         self.setupTools(p)
         self.setupMailHost(p)
         if int(create_userfolder) != 0:

Modified: CMF/branches/1.5/CMFDefault/__init__.py
===================================================================
--- CMF/branches/1.5/CMFDefault/__init__.py	2005-10-20 13:14:12 UTC (rev 39529)
+++ CMF/branches/1.5/CMFDefault/__init__.py	2005-10-20 13:17:36 UTC (rev 39530)
@@ -100,6 +100,7 @@
 registerDirectory('help', globals())
 
 def initialize( context ):
+    from Products import CMFTopic
 
     initializeBasesPhase2( z_bases, context )
     initializeBasesPhase2( z_tool_bases, context )



More information about the CMF-checkins mailing list