David Cournapeau wrote: > Hi, > > I have a program run through twistd, and would like to exit with a non > zero status code on some error. I have a callback which stops the > reactor and then sys.exit(some_value), but twistd still seems to catch > the SystemExit exception after calling for reactor.stop():
This isn't a good answer, exactly, but it may do the trick... import os reactor.addSystemEventTrigger('after', 'shutdown', os._exit, some_value) reactor.stop() I'm not sure that controlling the process exit value really fits nicely with twistd's purpose, though. -Andrew. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python