def kill(self):
if self._proc != None:
- self._proc.stdin.write('END\n')
- self._proc.stdin.flush()
+ try:
+ self._proc.stdin.write('END\n')
+ self._proc.stdin.flush()
+ except IOError, e:
+ pass
+ stdout,stderr = self._proc.communicate()
exit_code = self._proc.wait()
- assert exit_code == 0, 'Error exiting from %s: %d' % (
- self, exit_code)
+ assert exit_code == 0, 'Error exiting from %s: %d\n%s' % (
+ self, exit_code, stderr)
self._proc = None
def __str__(self):