[Zope-Checkins]
SVN: Zope/branches/jim-fix-zclasses/lib/python/transaction/_transaction.py
Added a sanity check to avoid registration of objects without a
Jim Fulton
jim at zope.com
Mon Feb 7 07:36:05 EST 2005
Log message for revision 29071:
Added a sanity check to avoid registration of objects without a
manager. (Perhaps this should be an assert.)
Changed:
U Zope/branches/jim-fix-zclasses/lib/python/transaction/_transaction.py
-=-
Modified: Zope/branches/jim-fix-zclasses/lib/python/transaction/_transaction.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/transaction/_transaction.py 2005-02-07 12:36:03 UTC (rev 29070)
+++ Zope/branches/jim-fix-zclasses/lib/python/transaction/_transaction.py 2005-02-07 12:36:05 UTC (rev 29071)
@@ -240,6 +240,8 @@
# commit protocol.
manager = getattr(obj, "_p_jar", obj)
+ if manager is None:
+ raise ValueError("Register with no manager")
adapter = self._adapters.get(manager)
if adapter is None:
if myhasattr(manager, "commit_sub"):
More information about the Zope-Checkins
mailing list