mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1041.5.6 (40e97fb09K8Oxvzk9KeNthtMZL24Tw)
Don't call pending deferred if already called.
This commit is contained in:
1 parent
1c894096e7
commit
b87f42498f
1 file changed
+4
-2
@@ -180,7 +180,8 @@ class ControllerFactory(CtrlMsgRcvr):
|
||||
"""
|
||||
if self.dlist:
|
||||
d = self.dlist.pop(0)
|
||||
d.callback(*args)
|
||||
if not d.called:
|
||||
d.callback(*args)
|
||||
|
||||
def errDeferred(self, *args):
|
||||
"""Signal an error to the top deferred object.
|
||||
@@ -189,7 +190,8 @@ class ControllerFactory(CtrlMsgRcvr):
|
||||
"""
|
||||
if self.dlist:
|
||||
d = self.dlist.pop(0)
|
||||
d.errback(*args)
|
||||
if not d.called:
|
||||
d.errback(*args)
|
||||
|
||||
class Controller(CtrlMsgRcvr):
|
||||
"""Abstract class for a device controller attached to a domain.
|
||||
|
||||