diff options
| author | bwarsaw | 2002-05-02 04:37:07 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-05-02 04:37:07 +0000 |
| commit | 17abc8a0702737a0310922b16f255d036127bf5a (patch) | |
| tree | c0d31097fae56cd701f404b42e5b0129d13f7cc3 /Mailman/Queue/CommandRunner.py | |
| parent | 10100c98e5ff73b44f22119887bce15e9e9c0376 (diff) | |
| download | mailman-17abc8a0702737a0310922b16f255d036127bf5a.tar.gz mailman-17abc8a0702737a0310922b16f255d036127bf5a.tar.zst mailman-17abc8a0702737a0310922b16f255d036127bf5a.zip | |
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
| -rw-r--r-- | Mailman/Queue/CommandRunner.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 3310b1cd4..60e6be8ac 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -59,6 +59,7 @@ class Results: self.results = [] self.ignored = [] self.lineno = 0 + self.subjcmdretried = 0 # Always process the Subject: header first self.commands.append(msg['subject']) # Find the first text/plain part @@ -99,10 +100,17 @@ class Results: __import__(modname) handler = sys.modules[modname] except ImportError: - # If we're on line zero, it was the Subject: header that - # didn't contain a command. This isn't enough to stop - # processing. BAW: should we include a message that the - # Subject: was ignored? + # If we're on line zero, it was the Subject: header that didn't + # contain a command. It's possible there's a Re: prefix (or + # localized version thereof) on the Subject: line that's messing + # things up. Pop the prefix off and try again... once. + # + # If that still didn't work it isn't enough to stop processing. + # BAW: should we include a message that the Subject: was ignored? + if not self.subjcmdretried and args: + self.subjcmdretried += 1 + cmd = args.pop(0) + return self.do_command(cmd, args) return self.lineno <> 0 return handler.process(self, args) |
