ia64/xen-unstable

changeset 1674:d3666e462d59

bitkeeper revision 1.1041.5.6 (40e97fb09K8Oxvzk9KeNthtMZL24Tw)

Don't call pending deferred if already called.
author mjw@wray-m-3.hpl.hp.com
date Mon Jul 05 16:20:00 2004 +0000 (2004-07-05)
parents 93d9954ab06c
children e56d5f41a977
files tools/python/xen/xend/server/controller.py
line diff
     1.1 --- a/tools/python/xen/xend/server/controller.py	Mon Jul 05 16:19:14 2004 +0000
     1.2 +++ b/tools/python/xen/xend/server/controller.py	Mon Jul 05 16:20:00 2004 +0000
     1.3 @@ -180,7 +180,8 @@ class ControllerFactory(CtrlMsgRcvr):
     1.4          """
     1.5          if self.dlist:
     1.6              d = self.dlist.pop(0)
     1.7 -            d.callback(*args)
     1.8 +            if not d.called:
     1.9 +                d.callback(*args)
    1.10  
    1.11      def errDeferred(self, *args):
    1.12          """Signal an error to the top deferred object.
    1.13 @@ -189,7 +190,8 @@ class ControllerFactory(CtrlMsgRcvr):
    1.14          """
    1.15          if self.dlist:
    1.16              d = self.dlist.pop(0)
    1.17 -            d.errback(*args)
    1.18 +            if not d.called:
    1.19 +                d.errback(*args)
    1.20  
    1.21  class Controller(CtrlMsgRcvr):
    1.22      """Abstract class for a device controller attached to a domain.