From 92fa58de9a1fe040d3abe1cefa27898cdc561cee Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 21 Nov 2002 05:34:18 +0000 Subject: Results.__init__(): Add a `respond' flag which is used by send_response() to enable or suppress confirmation responses. For example, when confirming a subscription, if a welcome message is going to be sent out, we don't need to also send a results of the confirmation message. send_response(): Suppress the response if the `respond' flag is false. --- Mailman/Queue/CommandRunner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 74544eac6..0b5f23bfa 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -61,6 +61,7 @@ class Results: self.ignored = [] self.lineno = 0 self.subjcmdretried = 0 + self.respond = 1 # Always process the Subject: header first self.commands.append(msg.get('subject', '')) # Find the first text/plain part @@ -119,9 +120,12 @@ class Results: return handler.process(self, args) def send_response(self): + # Helper def indent(lines): return [' ' + line for line in lines] - + # Quick exit for some commands which don't need a response + if not self.respond: + return resp = [Utils.wrap(_("""\ The results of your email command are provided below. Attached is your original message. -- cgit v1.2.3-70-g09d2