[Twisted-Python] callback wierdness

Andrew Bennetts andrew-twisted at puzzling.org
Tue Jul 29 21:47:26 EDT 2003

On Tue, Jul 29, 2003 at 07:12:03AM -0600, Justin Johnson wrote:
> In the attached files I defined process.openProcess to spawn a process
> using the reactor, and return a deferred from within my ProcessProtocol. 
> Then in trigger.py I define methods "make" and "remove" that utilize
> process.openProcess to run a command.  make() adds callbacks to the
> deferred to display the results of the execution, and at the bottom of
> trigger.py I add a callback to remove the trigger after creating it.
> The problem is, none of my callbacks ever get called.  The initial
> spawnProcess works and I can see the trigger is created, but nothing is
> printed to the screen (callback 1 added in "make") and the trigger is not
> removed (callback 2 added at end of file).

Without looking closely, I notice that you never add an errback to your
Deferreds, only callbacks.  Try d.addErrback(twisted.python.log.err), and
see if that helps you figure out what's going wrong.


More information about the Twisted-Python mailing list