X-Git-Url: https://projects.mako.cc/source/attachcheck/blobdiff_plain/6d218b1151bdebf069401152960f6631d8d8b0f8..e1c3042eba5989f7db537ceda2766e08c15f9b59:/attachcheck diff --git a/attachcheck b/attachcheck index e5ac549..e633291 100755 --- a/attachcheck +++ b/attachcheck @@ -58,9 +58,11 @@ def send_message(): cmd[0] = sendmail from subprocess import Popen, PIPE - mailpipe = Popen(cmd, stdin=PIPE).stdin + process = Popen(cmd, stdin=PIPE) + mailpipe = process.stdin mailpipe.write( message_string ) - sys.exit( mailpipe.close() ) + mailpipe.close() + sys.exit( process.wait() ) ## SUB: print error message def print_error():