[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/schema/vocabulary.py clean imports, soft dep to testing

Bernd Dorn bernd.dorn at lovelysystems.com
Tue Mar 27 03:25:22 EDT 2007


Log message for revision 73667:
  clean imports, soft dep to testing

Changed:
  U   Zope3/trunk/src/zope/app/schema/vocabulary.py

-=-
Modified: Zope3/trunk/src/zope/app/schema/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/schema/vocabulary.py	2007-03-27 07:20:45 UTC (rev 73666)
+++ Zope3/trunk/src/zope/app/schema/vocabulary.py	2007-03-27 07:25:21 UTC (rev 73667)
@@ -16,10 +16,9 @@
 $Id$
 """
 import zope.component
-from zope.interface import Interface, implements
+from zope.interface import implements
 from zope.schema.interfaces import IVocabularyRegistry
 from zope.schema import vocabulary
-from zope.testing import cleanup
 from zope.schema.interfaces import IVocabularyFactory
 
 class ZopeVocabularyRegistry(object):
@@ -44,4 +43,9 @@
     vocabulary.setVocabularyRegistry(ZopeVocabularyRegistry())
 
 _clear()
-cleanup.addCleanUp(_clear)
+try:
+    from zope.testing import cleanup
+except ImportError:
+    pass
+else:
+    cleanup.addCleanUp(_clear)



More information about the Zope3-Checkins mailing list