[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/component/ make
testing a soft dep
Bernd Dorn
bernd.dorn at lovelysystems.com
Mon Mar 26 11:53:53 EDT 2007
Log message for revision 73636:
make testing a soft dep
Changed:
U Zope3/trunk/src/zope/app/component/hooks.py
U Zope3/trunk/src/zope/app/component/site.py
-=-
Modified: Zope3/trunk/src/zope/app/component/hooks.py
===================================================================
--- Zope3/trunk/src/zope/app/component/hooks.py 2007-03-26 15:47:22 UTC (rev 73635)
+++ Zope3/trunk/src/zope/app/component/hooks.py 2007-03-26 15:53:52 UTC (rev 73636)
@@ -108,5 +108,9 @@
# Clear the site thread global
clearSite = setSite
-from zope.testing.cleanup import addCleanUp
-addCleanUp(resetHooks)
+try:
+ from zope.testing.cleanup import addCleanUp
+except ImportError:
+ pass
+else:
+ addCleanUp(resetHooks)
Modified: Zope3/trunk/src/zope/app/component/site.py
===================================================================
--- Zope3/trunk/src/zope/app/component/site.py 2007-03-26 15:47:22 UTC (rev 73635)
+++ Zope3/trunk/src/zope/app/component/site.py 2007-03-26 15:53:52 UTC (rev 73636)
@@ -384,8 +384,12 @@
# Clear the site thread global
clearSite = setSite
-from zope.testing.cleanup import addCleanUp
-addCleanUp(clearSite)
+try:
+ from zope.testing.cleanup import addCleanUp
+except ImportError:
+ pass
+else:
+ addCleanUp(clearSite)
@zope.component.adapter(zope.interface.Interface)
More information about the Zope3-Checkins
mailing list