[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Including stdin pipe for mail command
commit 3877bddea9146252927e87abf353b79e16debe0b
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Mon Sep 16 12:27:05 2013 -0700
Including stdin pipe for mail command
Missing ingredient. Without this the communicate() method just hangs without
sending anything to stdin.
---
util.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/util.py b/util.py
index 32e795e..7dd81fc 100644
--- a/util.py
+++ b/util.py
@@ -90,7 +90,13 @@ def send(subject, body_text = None, destination = TO_ADDRESS):
:raises: **Exception** if the email fails to be sent
"""
- process = subprocess.Popen(['mail', '-E', '-s', subject, destination], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
+ process = subprocess.Popen(
+ ['mail', '-E', '-s', subject, destination],
+ stdout = subprocess.PIPE,
+ stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE,
+ )
+
stdout, stderr = process.communicate(body_text)
exit_code = process.poll()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits