From 4720fcd2521750f2112f1c65fb42e45eb54e029d Mon Sep 17 00:00:00 2001 From: Michael Gregson Date: Wed, 17 Jun 2009 20:33:42 -0600 Subject: [PATCH] Added comments containing code to add new members to a mailing list using listadmin. Left to do: - create mailing list - create and publish listadmin config file - update code to use listadmin config file - uncomment code - ponder implications of listadmin config file (security) --- ceo/members.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ceo/members.py b/ceo/members.py index d78f04d9d..87494c1a9 100644 --- a/ceo/members.py +++ b/ceo/members.py @@ -152,6 +152,12 @@ def create_member(username, password, name, program): addmember = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = addmember.communicate(password) status = addmember.wait() + + # # If the user was created, consider adding them to the mailing list + # if not status: + # listadmin_cfg_file = "/path/to/the/listadmin/config/file" + # mail = subprocess.Popen(["/usr/bin/listadmin", "-f", listadmin_cfg_file, "--add-member", username + "@csclub.uwaterloo.ca"]) + # status2 = mail.wait() # Fuck if I care about errors! except OSError, e: raise MemberException(e)