[Zope3-checkins]
SVN: Zope3/trunk/src/zope/component/globalregistry.py
zope.testing should not be a hard dependency, fixes #760
Baiju M
baiju.m.mail at gmail.com
Tue Mar 27 08:55:16 EDT 2007
Log message for revision 73725:
zope.testing should not be a hard dependency, fixes #760
Changed:
U Zope3/trunk/src/zope/component/globalregistry.py
-=-
Modified: Zope3/trunk/src/zope/component/globalregistry.py
===================================================================
--- Zope3/trunk/src/zope/component/globalregistry.py 2007-03-27 12:47:26 UTC (rev 73724)
+++ Zope3/trunk/src/zope/component/globalregistry.py 2007-03-27 12:55:16 UTC (rev 73725)
@@ -134,13 +134,17 @@
for reg in self.registeredUtilities():
yield reg
#
- ####################################################################
+ ####################################################################
base = BaseGlobalComponents('base')
-from zope.testing.cleanup import addCleanUp
-addCleanUp(lambda: base.__init__('base'))
-del addCleanUp
+try:
+ from zope.testing.cleanup import addCleanUp
+except:
+ pass
+else:
+ addCleanUp(lambda: base.__init__('base'))
+ del addCleanUp
globalSiteManager = base
def getGlobalSiteManager():
More information about the Zope3-Checkins
mailing list