[Twisted-Python] Sane way to get the exit code from reactor.spawnProcess(SomeProtocol, ...)

Nathan nathan.stocks at gmail.com
Wed Jun 25 12:55:13 EDT 2008

On Tue, Jun 24, 2008 at 5:39 PM, Itamar Shtull-Trauring
<itamar at itamarst.org> wrote:
> reason.value will be instance of ProcessExited or something (it's in
> twisted.internet.error), which should have exitCode attribute or
> something. Check the API reference for twisted.internet.error.

Ah, that's what I was missing.  Since "print reason.value" spit out
such a nice string, I falsely assumed it was just a string.

reason.value.exitCode is what I was looking for.  Thanks!

~ Nathan

More information about the Twisted-Python mailing list