[Zope3-checkins] CVS: Zope3/src/zope/app/container - zopecontainer.py:1.4
Albertas Agejevas
alga@codeworks.lt
Thu, 16 Jan 2003 07:00:30 -0500
Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv9894/zope/app/container
Modified Files:
zopecontainer.py
Log Message:
Added missing IDeleteNotifiable implementations to ViewConfiguration
and PageConfiguration. Refactored the same in AdapterConfiguration.
=== Zope3/src/zope/app/container/zopecontainer.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/container/zopecontainer.py:1.3 Mon Dec 30 09:02:54 2002
+++ Zope3/src/zope/app/container/zopecontainer.py Thu Jan 16 06:59:58 2003
@@ -128,7 +128,11 @@
adapter = queryAdapter(object, IDeleteNotifiable)
if adapter is not None:
adapter.manage_beforeDelete(object, container)
-
+ elif hasattr(object, 'manage_beforeDelete'):
+ # XXX: Ideally, only do this in debug mode.
+ from warnings import warn
+ warn("Class %s has manage_beforeDelete but is not IDeleteNotifiable" %
+ object.__class__)
del container[key]