Fix mailman lists command to not output trailing blanks and handle long list ids.
[mailman.git] / src / mailman / commands / eml_end.py
blobffe5fea91ab8be3d3dcf8b7e47fe4caf7cb83929
1 # Copyright (C) 2002-2023 by the Free Software Foundation, Inc.
3 # This file is part of GNU Mailman.
5 # GNU Mailman is free software: you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option)
8 # any later version.
10 # GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 # more details.
15 # You should have received a copy of the GNU General Public License along with
16 # GNU Mailman. If not, see <https://www.gnu.org/licenses/>.
18 """The email commands 'end' and 'stop'."""
20 from mailman.core.i18n import _
21 from mailman.interfaces.command import ContinueProcessing, IEmailCommand
22 from public import public
23 from zope.interface import implementer
26 @public
27 @implementer(IEmailCommand)
28 class End:
29 """The email 'end' command."""
31 name = 'end'
32 argument_description = ''
33 description = _('Stop processing commands.')
34 short_description = description
36 def process(self, mlist, msg, msgdata, arguments, results):
37 """See `IEmailCommand`."""
38 # Ignore all arguments.
39 return ContinueProcessing.no
42 @public
43 class Stop(End):
44 """The email 'stop' command (an alias for 'end')."""
46 name = 'stop'
47 description = _("An alias for 'end'.")
48 short_description = description