[Zope3-checkins] SVN: Zope3/branches/srichter-blow-services/src/zope/app/component/registration.py Not every component might support the dependable framework. In a few

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Feb 4 16:52:31 EST 2005


Log message for revision 29046:
  Not every component might support the dependable framework. In a few 
  cases, such as page folders, the component is actually generated at 
  runtime based on other info.
  
  

Changed:
  U   Zope3/branches/srichter-blow-services/src/zope/app/component/registration.py

-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/registration.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/registration.py	2005-02-04 18:08:01 UTC (rev 29045)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/registration.py	2005-02-04 21:52:31 UTC (rev 29046)
@@ -148,7 +148,11 @@
 def ComponentRegistrationRemoveSubscriber(componentRegistration, event):
     """Receive notification of remove event."""
     component = componentRegistration.component
-    dependents = IDependable(component)
+    # XXX: test failure
+    try:
+        dependents = IDependable(component)
+    except TypeError:
+        return
     objectpath = zapi.getPath(componentRegistration)
     dependents.removeDependent(objectpath)
 
@@ -156,7 +160,11 @@
 def ComponentRegistrationAddSubscriber(componentRegistration, event):
     """Receive notification of add event."""
     component = componentRegistration.component
-    dependents = IDependable(component)
+    # XXX: test failure
+    try:
+        dependents = IDependable(component)
+    except TypeError:
+        return
     objectpath = zapi.getPath(componentRegistration)
     dependents.addDependent(objectpath)
 



More information about the Zope3-Checkins mailing list