Page MenuHome

Properly clean up Python when exiting due to --python-exit-code

Authored by Sybren A. Stüvel (sybren) on Jan 4 2019, 6:41 PM.



When BPY_python_end() is not called, there can be buffered data still in sys.stdout or sys.stderr. This generally isn't an issue when those are connected to a terminal, but when they are read by another process (in the case of rendering with Flamenco, for example) we could miss the actual error message that's causing the exit in the first place.

Diff Detail

rB Blender

Event Timeline

Guess @Campbell Barton (campbellbarton) will have final word here, but this makes perfect sense to me. +1

This revision is now accepted and ready to land.Jan 4 2019, 7:23 PM
This revision was automatically updated to reflect the committed changes.