Commit 8978b179 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix _exit implementation.

- add missing status parameter
- tabs are evil
- use sys.exit instead of raising KeyboarInterrupt (it raises SystemExit)

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2562 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 04287e68
......@@ -87,13 +87,9 @@ class NEOProcess(object):
print 'Error executing %r.' % (command + ' ' + ' '.join(args), )
self._exit(-1)
def _exit(self):
# KeyboardInterrupt is not intercepted by test runner (it is still
# above us in the stack), and we do want to exit.
# To avoid polluting test foreground output with induced
# traceback, replace stdout & stderr.
sys.stdout = sys.stderr = open('/dev/null', 'w')
raise KeyboardInterrupt
def _exit(self, status=0):
sys.stdout = sys.stderr = open('/dev/null', 'w')
sys.exit(status)
def kill(self, sig=signal.SIGTERM):
if self.pid:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment