Hi,

I am little new to twisted.
I've a function(get_handle) which returns a handle.

But get_handle() may throw an exception(SystemDelayException) because of some delay in system. My requirement is : When I get SystemDelayException re-attempt get_handle() and return only when handle is available. How do I use deferred/reactor in this scenario?

try:
    handle = yield self.get_handle()
except SystemDelayException:
// code to re-attempt get_handle and return only when handle is available

Regards
Vikas


_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to