Logo Search packages:      
Sourcecode: nanny version File versions  Download package

def src::proxy::Controllers::BlockingDeferred::blockOn (   self  ) 

Call this to block and get the result of the wrapped Deferred.

On success this will return the result.

On failure, it will raise an exception.

Definition at line 51 of file Controllers.py.

00051                      :
        """Call this to block and get the result of the wrapped Deferred.
        
        On success this will return the result.
        
        On failure, it will raise an exception.
        """
        
        self.d.addBoth(self.gotResult)
        self.d.addErrback(self.gotFailure)
        
        while not self.finished:
            reactor.iterate(TIMEOUT)
            self.count += 1
        
        if isinstance(self.d.result, dict):
            f = self.d.result.get('failure', None)
            if isinstance(f, failure.Failure):
                f.raiseException()
        return self.d.result

    def gotResult(self, result):


Generated by  Doxygen 1.6.0   Back to index