[Checkins] SVN: CMF/branches/jens_tools_as_utilities/CMFCore/ Added appropriate zcml inclusion of five.localsitemanager ... this required moving the sys.path mangling out of the initialize function.

Rocky Burt rocky at serverzen.com
Thu Feb 22 18:37:58 EST 2007


Log message for revision 72780:
  Added appropriate zcml inclusion of five.localsitemanager ... this required moving the sys.path mangling out of the initialize function.

Changed:
  U   CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py
  U   CMF/branches/jens_tools_as_utilities/CMFCore/configure.zcml
  A   CMF/branches/jens_tools_as_utilities/CMFCore/overrides.zcml

-=-
Modified: CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py	2007-02-22 23:28:19 UTC (rev 72779)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py	2007-02-22 23:37:57 UTC (rev 72780)
@@ -68,15 +68,15 @@
                      ,
                      )
 
+try:
+    import five.localsitemanager
+except ImportError, e:
+    import sys
+    import os
+    sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
+    import five.localsitemanager
+
 def initialize(context):
-    try:
-        import five.localsitemanager
-    except ImportError, e:
-        import sys
-        import os
-        sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
-        import five.localsitemanager
-
     context.registerClass(
         DirectoryView.DirectoryView,
         constructors=(('manage_addDirectoryViewForm',

Modified: CMF/branches/jens_tools_as_utilities/CMFCore/configure.zcml
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/configure.zcml	2007-02-22 23:28:19 UTC (rev 72779)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/configure.zcml	2007-02-22 23:37:57 UTC (rev 72780)
@@ -1,6 +1,8 @@
 <configure
     xmlns="http://namespaces.zope.org/zope">
 
+  <include package="five.localsitemanager" />
+
   <include package=".browser"/>
 
   <include package=".exportimport"/>

Added: CMF/branches/jens_tools_as_utilities/CMFCore/overrides.zcml
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/overrides.zcml	2007-02-22 23:28:19 UTC (rev 72779)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/overrides.zcml	2007-02-22 23:37:57 UTC (rev 72780)
@@ -0,0 +1,6 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope">
+
+  <include package="five.localsitemanager" file="overrides.zcml" />
+
+</configure>



More information about the Checkins mailing list