With this patch, if the editor exits with a non-zero status, stop
sending any e-mails.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
print 'Invoking the editor: "%s"...' % editor,
sys.stdout.flush()
print 'Invoking the editor: "%s"...' % editor,
sys.stdout.flush()
- print 'done (exit code: %d)' % os.system(editor)
+ err = os.system(editor)
+ if err:
+ raise CmdException, 'editor failed, exit code: %d' % err
+ print 'done'
# read the message back
f = file(fname)
# read the message back
f = file(fname)