changeset 92:878a5b7697f2

Consume errors in DeferredLists.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 17 Nov 2004 21:00:03 +0000
parents 47ee5369c410
children ea3b2410c01c
files idavoll/backend.py idavoll/idavoll.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/idavoll/backend.py	Wed Nov 17 20:43:45 2004 +0000
+++ b/idavoll/backend.py	Wed Nov 17 21:00:03 2004 +0000
@@ -198,7 +198,7 @@
     def publish(self, node_id, items, requestor):
         d1 = self.parent.storage.get_node_configuration(node_id)
         d2 = self.parent.storage.get_affiliation(node_id, requestor)
-        d = defer.DeferredList([d1, d2], fireOnOneErrback=1)
+        d = defer.DeferredList([d1, d2], fireOnOneErrback=1, consumeErrors=1)
         d.addErrback(lambda x: x.value[0])
         d.addCallback(self._do_publish, node_id, items, requestor)
         return d
@@ -270,7 +270,7 @@
 
         d1 = self.parent.storage.get_node_configuration(node_id)
         d2 = self.parent.storage.get_affiliation(node_id, subscriber)
-        d = defer.DeferredList([d1, d2], fireOnOneErrback=1)
+        d = defer.DeferredList([d1, d2], fireOnOneErrback=1, consumeErrors=1)
         d.addErrback(lambda x: x.value[0])
         d.addCallback(self._do_subscribe, node_id, subscriber)
         return d
@@ -326,7 +326,7 @@
     def get_affiliations(self, entity):
         d1 = self.parent.storage.get_affiliations(entity)
         d2 = self.parent.storage.get_subscriptions(entity)
-        d = defer.DeferredList([d1, d2], fireOnOneErrback=1)
+        d = defer.DeferredList([d1, d2], fireOnOneErrback=1, consumeErrors=1)
         d.addErrback(lambda x: x.value[0])
         d.addCallback(self._affiliations_result, entity)
         return d
--- a/idavoll/idavoll.py	Wed Nov 17 20:43:45 2004 +0000
+++ b/idavoll/idavoll.py	Wed Nov 17 21:00:03 2004 +0000
@@ -52,7 +52,7 @@
             if components.implements(c, component.IService):
                 if hasattr(c, "get_disco_info"):
                     dl.append(c.get_disco_info(node))
-        d = defer.DeferredList(dl, fireOnOneErrback=1)
+        d = defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1)
         d.addCallback(self._disco_info_results, iq, node)
         d.addErrback(self._error, iq)
         d.addCallback(self.send)
@@ -84,7 +84,7 @@
             if components.implements(c, component.IService):
                 if hasattr(c, "get_disco_items"):
                     dl.append(c.get_disco_items(node))
-        d = defer.DeferredList(dl, fireOnOneErrback=1)
+        d = defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1)
         d.addCallback(self._disco_items_result, iq, node)
         d.addErrback(self._error, iq)
         d.addCallback(self.send)