From d6e6ac7eac7b4e6084903fa71cbe9b6996adbd88 Mon Sep 17 00:00:00 2001 From: twouters Date: Tue, 11 Mar 2003 22:51:44 +0000 Subject: When receiving an empty mail (no results and no unprocessed lines, but possibly 'ignored' lines, if a lot of 'em were blank) on a command-handler address, inform the user that the mail was empty, and how to get help. Based on SF patch #522080, Respond sensibly to blank -request email, by Seb Wills. --- Mailman/Queue/CommandRunner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 785511b31..27ecb621e 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -140,6 +140,12 @@ Attached is your original message. if unprocessed: resp.append(_('\n- Unprocessed:')) resp.extend(indent(unprocessed)) + if not unprocessed and not self.results: + # The user sent an empty message; return a helpful one. + resp.append(Utils.wrap(_("""\ +No commands were found in this message. +To obtain instructions, send a message containing just the word "help". +"""))) if self.ignored: resp.append(_('\n- Ignored:')) resp.extend(indent(self.ignored)) -- cgit v1.2.3-70-g09d2