Index: process.py =================================================================== --- process.py (revision 11704) +++ process.py (working copy) @@ -265,8 +265,10 @@ traceback.print_exc() finally: util.info('process exiting with exitcode %d' % exitcode) - sys.stdout.flush() - sys.stderr.flush() + if sys.stdout is not None: + sys.stdout.flush() + if sys.stderr is not None: + sys.stderr.flush() return exitcode