From: Frank Brehm Date: Tue, 29 Mar 2022 16:44:16 +0000 (+0200) Subject: Minor changes X-Git-Tag: 0.4.1^2~28 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=5d33b0ca6083c6f637bf1541a79b7153035babcc;p=pixelpark%2Fpp-admin-tools.git Minor changes --- diff --git a/lib/pp_admintools/mail_app.py b/lib/pp_admintools/mail_app.py index 0f70748..a7fdb0e 100644 --- a/lib/pp_admintools/mail_app.py +++ b/lib/pp_admintools/mail_app.py @@ -22,6 +22,7 @@ import smtplib # Own modules from . import __version__ as GLOBAL_VERSION +from . import MAX_PORT_NUMBER from fb_tools.common import pp @@ -33,12 +34,14 @@ from fb_tools.xlate import format_list from .xlate import XLATOR +from .argparse_actions import PortOptionAction + from .mail_config import MailConfiguration -from .mail_config import VALID_MAIL_METHODS, MAX_PORT_NUMBER +from .mail_config import VALID_MAIL_METHODS from .mailaddress import MailAddress -__version__ = '0.2.2' +__version__ = '0.2.3' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -67,6 +70,8 @@ class BaseMailApplication(FbConfigApplication): super(BaseMailApplication, self).__init__( appname=appname, verbose=verbose, version=version, base_dir=base_dir, description=description, cfg_class=cfg_class, initialized=False, + argparse_epilog=argparse_epilog, argparse_prefix_chars=argparse_prefix_chars, + env_prefix=env_prefix, ) # ------------------------------------------------------------------------- @@ -244,7 +249,8 @@ class BaseMailApplication(FbConfigApplication): mail_group.add_argument( '--smtp-port', - metavar=_("PORT"), type=int, dest='smtp_port', + metavar=_("PORT"), type=int, dest='smtp_port', what="SMTP", + action=PortOptionAction, help=_( "The port to use for submitting generated by this script if " "the mail method of this script is 'smtp'. Default: {}.").format(