[Zope3-checkins] CVS: Zope3/src/transaction - interfaces.py:1.5.50.5 util.py:1.1.2.2

Fred L. Drake, Jr. fred at zope.com
Fri Feb 13 10:05:06 EST 2004


Update of /cvs-repository/Zope3/src/transaction
In directory cvs.zope.org:/tmp/cvs-serv32701

Modified Files:
      Tag: zope3-zodb3-devel-branch
	interfaces.py util.py 
Log Message:
be resilient when zope.interface is not available


=== Zope3/src/transaction/interfaces.py 1.5.50.4 => 1.5.50.5 ===
--- Zope3/src/transaction/interfaces.py:1.5.50.4	Thu Jan 22 14:42:53 2004
+++ Zope3/src/transaction/interfaces.py	Fri Feb 13 10:05:02 2004
@@ -11,7 +11,12 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zope.interface import Interface
+
+try:
+    from zope.interface import Interface
+except ImportError:
+    class Interface:
+        pass
 
 
 class IDataManager(Interface):


=== Zope3/src/transaction/util.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/transaction/util.py:1.1.2.1	Fri Jan 23 13:25:04 2004
+++ Zope3/src/transaction/util.py	Fri Feb 13 10:05:02 2004
@@ -16,9 +16,14 @@
 $Id$
 """
 
-import zope.interface
 from transaction.interfaces import IRollback
 
+try:
+    from zope.interface import implements
+except ImportError:
+    def implements(*args):
+        pass
+
 class NoSavepointSupportRollback:
     """Rollback for data managers that don't support savepoints
 
@@ -35,7 +40,7 @@
     
     """
 
-    zope.interface.implements(IRollback)
+    implements(IRollback)
 
     def __init__(self, dm):
         self.dm = dm.__class__.__name__




More information about the Zope3-Checkins mailing list