[Zope3-checkins] CVS: Zope3/src/zope/app/rdb - __init__.py:1.22.2.2

Jim Fulton jim at zope.com
Fri Jan 23 13:25:07 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/rdb
In directory cvs.zope.org:/tmp/cvs-serv9157/src/zope/app/rdb

Modified Files:
      Tag: zope3-zodb3-devel-branch
	__init__.py 
Log Message:
Moved the NoSavepointSupportRollback class ro transaction,
as it's needed by any data manager that doesn't support
savepoint rollback.


=== Zope3/src/zope/app/rdb/__init__.py 1.22.2.1 => 1.22.2.2 ===
--- Zope3/src/zope/app/rdb/__init__.py:1.22.2.1	Fri Jan 23 11:41:26 2004
+++ Zope3/src/zope/app/rdb/__init__.py	Fri Jan 23 13:25:06 2004
@@ -28,6 +28,7 @@
 
 from transaction import get_transaction
 from transaction.interfaces import IDataManager, IRollback
+from transaction.util import NoSavepointSupportRollback
 
 from zope.security.checker import NamesChecker
 
@@ -386,23 +387,8 @@
            """ZopeDBTransactionManager data managers do not support """ \
            """savepoints (aka subtransactions
         """
-        
-        
-        return NoSavepointSupportRollback(self)
-
-class NoSavepointSupportRollback:
-    """Rollback for data managers that don't support savepoints
-    """
-
-    implements(IRollback)
 
-    def __init__(self, dm):
-        self.dm = dm.__class__.__name__
-
-    def rollback(self):
-        raise NotImplementedError(
-            "%s data managers do not support savepoints (aka subtransactions"
-            % self.dm)
+        return NoSavepointSupportRollback(self)
     
 
 class Row(object):




More information about the Zope3-Checkins mailing list