]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Fixing module pp_admintools.app.mail.
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 6 Sep 2022 11:57:43 +0000 (13:57 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 6 Sep 2022 11:57:43 +0000 (13:57 +0200)
lib/pp_admintools/app/mail.py

index 0cbae47a1d1cbf0e6cc11ccc43a0d13b91d07564..46ae30685830b46ac428619116fd85e52bbe51d5 100644 (file)
@@ -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(