From: Frank Brehm Date: Tue, 6 Sep 2022 11:57:43 +0000 (+0200) Subject: Fixing module pp_admintools.app.mail. X-Git-Tag: 0.5.0^2~2^2~18 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=7e35cf78218bb160ed27686f30b32348112a15aa;p=pixelpark%2Fpp-admin-tools.git Fixing module pp_admintools.app.mail. --- diff --git a/lib/pp_admintools/app/mail.py b/lib/pp_admintools/app/mail.py index 0cbae47..46ae306 100644 --- a/lib/pp_admintools/app/mail.py +++ b/lib/pp_admintools/app/mail.py @@ -40,9 +40,8 @@ from ..xlate import XLATOR from ..argparse_actions import PortOptionAction from ..config.mail import MailConfiguration -from ..config.mail import VALID_MAIL_METHODS -__version__ = '0.2.8' +__version__ = '0.2.9' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -242,10 +241,11 @@ class BaseMailApplication(FbConfigApplication): help=_("Reply mail address for mails generated by this script.") ) - method_list = format_list(VALID_MAIL_METHODS, do_repr=True) + methods = MailConfiguration.valid_mail_methods + method_list = format_list(methods, do_repr=True) mail_group.add_argument( '--mail-method', - metavar=_("METHOD"), choices=VALID_MAIL_METHODS, dest="mail_method", + metavar=_("METHOD"), choices=methods, dest="mail_method", help=_( "Method for sending the mails generated by this script. " "Valid values: {v}, default: {d!r}.").format(