[nanny] fix callback on BlockDeferred



commit 8e4b52760598d5fbc393cc115e1fbf719d347f63
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Tue Sep 28 02:56:11 2010 +0200

    fix callback on BlockDeferred

 daemon/src/BlockingDeferred.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/daemon/src/BlockingDeferred.py b/daemon/src/BlockingDeferred.py
index 8d69762..e93025b 100644
--- a/daemon/src/BlockingDeferred.py
+++ b/daemon/src/BlockingDeferred.py
@@ -28,6 +28,8 @@ from twisted.internet.defer import AlreadyCalledError
 from twisted.python import failure
 from twisted.web import client
 
+import os
+import gtk
 
 TIMEOUT = 0.05                  # Set the timeout for poll/select
 
@@ -48,7 +50,7 @@ class BlockingDeferred(object):
         On failure, it will raise an exception.
         """
         
-        self.d.addBoth(self.gotResult)
+        self.d.addCallback(self.gotResult)
         self.d.addErrback(self.gotFailure)
         
         while not self.finished:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]