X-Git-Url: https://projects.mako.cc/source/attachcheck/blobdiff_plain/6d218b1151bdebf069401152960f6631d8d8b0f8..786be57db0813f999af2454536121a8c3b3d82ee:/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():