On 11:09 am, yperc...@gmail.com wrote: >I think that you should not put the sys.exit(1) call, after the >reactor.stop() call. >> From my very limited understanding of how Twisted reactor works, it >>could be >done with something like: > > statusCode = 1 #or whatever > reactor.stop() > >in the method that stops the reactor > >and the exit call should be added where (after) the reactor is started: > > reactor.run() > # this will be executed after reactor stops > sys.exit(statusCode) > >Please, correct me if I write nonsense here.
Your understanding seems correct to me. :) This is basically how the feature would be implemented. Since David is using `twistd` though, he doesn't get to put extra code after the `reactor.run()` call. http://twistedmatrix.com/trac/ticket/2182 is a ticket for adding a feature to `twistd` to make this easier. Jean-Paul _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python