[Zodb-checkins] CVS: ZODB3/ZODB - POSException.py:1.17
Tue, 10 Dec 2002 16:42:07 -0500
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv19311
UndoError() constructor now takes its arguments in reverse order,
i.e. reason first, then oid. This is because there's always a reason
but sometimes there isn't an oid (so we can default arg the oid).
=== ZODB3/ZODB/POSException.py 1.16 => 1.17 ===
--- ZODB3/ZODB/POSException.py:1.16 Mon Dec 9 14:39:45 2002
+++ ZODB3/ZODB/POSException.py Tue Dec 10 16:42:05 2002
@@ -169,9 +169,9 @@
"""An attempt was made to undo a non-undoable transaction."""
- def __init__(self, oid, reason=None):
- self._oid = oid
+ def __init__(self, reason, oid=None):
self._reason = reason
+ self._oid = oid
return _fmt_undo(self._oid, self._reason)
@@ -180,7 +180,7 @@
"""Several undo errors occured during a single transaction."""
def __init__(self, errs):
- # provide an oid and reason for clients that only look at that
+ # provide a reason and oid for clients that only look at that
self._errs = errs