[z3-checkins] r21770 - in z3/Five/branch/Five-1.2: . site

philikon at codespeak.net philikon at codespeak.net
Sat Jan 7 09:41:08 CET 2006


Author: philikon
Date: Sat Jan  7 09:41:00 2006
New Revision: 21770

Modified:
   z3/Five/branch/Five-1.2/CHANGES.txt
   z3/Five/branch/Five-1.2/site/metaconfigure.py
Log:
Backport r21750 from trunk:
* If one class was set to have a localsite hook twice, removing the hook would be
  attempted twice during the cleanup of unit tests, and the tests would fail.


Modified: z3/Five/branch/Five-1.2/CHANGES.txt
==============================================================================
--- z3/Five/branch/Five-1.2/CHANGES.txt	(original)
+++ z3/Five/branch/Five-1.2/CHANGES.txt	Sat Jan  7 09:41:00 2006
@@ -19,6 +19,10 @@
 
 * Fix cleanup of five:traversable.
 
+* If one class was set to have a localsite hook twice, removing the
+  hook would be attempted twice during the cleanup of unit tests, and
+  the tests would fail.
+
 Restructuring
 -------------
 

Modified: z3/Five/branch/Five-1.2/site/metaconfigure.py
==============================================================================
--- z3/Five/branch/Five-1.2/site/metaconfigure.py	(original)
+++ z3/Five/branch/Five-1.2/site/metaconfigure.py	Sat Jan  7 09:41:00 2006
@@ -25,13 +25,14 @@
 
 from Products.Five.site.localsite import FiveSite
 
+_localsite_monkies = []
 def classSiteHook(class_, site_class):
     setattr(class_, 'getSiteManager',
             site_class.getSiteManager.im_func)
     setattr(class_, 'setSiteManager',
             site_class.setSiteManager.im_func)
+    _localsite_monkies.append(class_)
 
-_localsite_monkies = []
 def installSiteHook(_context, class_, site_class=None):
     if site_class is None:
         if not IPossibleSite.implementedBy(class_):
@@ -53,7 +54,6 @@
             callable = classImplements,
             args=(class_, IPossibleSite)
             )
-    _localsite_monkies.append(class_)
 
 # clean up code
 


More information about the z3-checkins mailing list