Page MenuHome

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

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

Details

Summary

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

Repository
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.Fri, Jan 4, 7:23 PM
This revision was automatically updated to reflect the committed changes.