From: Frank Brehm Date: Thu, 21 Apr 2022 16:51:30 +0000 (+0200) Subject: Using MailAddress from fb_tools X-Git-Tag: 0.4.2^2~5^2~18 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=af46cc4da108ca0b6699dc0cd62a8bc8225e7949;p=pixelpark%2Fpp-admin-tools.git Using MailAddress from fb_tools --- diff --git a/lib/pp_admintools/config.py b/lib/pp_admintools/config.py index 35dc52c..df09b38 100644 --- a/lib/pp_admintools/config.py +++ b/lib/pp_admintools/config.py @@ -20,16 +20,16 @@ import copy from fb_tools.multi_config import MultiConfigError, BaseMultiConfig from fb_tools.multi_config import DEFAULT_ENCODING +from fb_tools import MailAddress + # Own modules from .errors import PpError -from .mailaddress import MailAddress - from .xlate import XLATOR CONFIG_DIR = 'pixelpark' -__version__ = '0.1.1' +__version__ = '0.1.2' LOG = logging.getLogger(__name__) VALID_MAIL_METHODS = ('smtp', 'sendmail') @@ -62,7 +62,7 @@ class PpBaseConfiguration(BaseMultiConfig): current_user_name = pwd.getpwuid(os.getuid()).pw_name current_user_gecos = pwd.getpwuid(os.getuid()).pw_gecos - default_mail_from = MailAddress(current_user_name, socket.getfqdn()) + default_mail_from = MailAddress(user=current_user_name, domain=socket.getfqdn()) # ------------------------------------------------------------------------- def __init__( diff --git a/lib/pp_admintools/mail_app.py b/lib/pp_admintools/mail_app.py index 89d5d50..255142a 100644 --- a/lib/pp_admintools/mail_app.py +++ b/lib/pp_admintools/mail_app.py @@ -32,6 +32,8 @@ from fb_tools.errors import FbAppError from fb_tools.xlate import format_list +from fb_tools import MailAddress + from .xlate import XLATOR from .argparse_actions import PortOptionAction @@ -39,9 +41,7 @@ from .argparse_actions import PortOptionAction from .mail_config import MailConfiguration from .mail_config import VALID_MAIL_METHODS -from .mailaddress import MailAddress - -__version__ = '0.2.5' +__version__ = '0.2.6' LOG = logging.getLogger(__name__) _ = XLATOR.gettext diff --git a/lib/pp_admintools/mail_config.py b/lib/pp_admintools/mail_config.py index 820365a..563f5c7 100644 --- a/lib/pp_admintools/mail_config.py +++ b/lib/pp_admintools/mail_config.py @@ -27,14 +27,14 @@ from fb_tools.common import is_sequence, pp from fb_tools.multi_config import MultiConfigError, BaseMultiConfig from fb_tools.multi_config import DEFAULT_ENCODING +from fb_tools import MailAddress + from . import __version__ as GLOBAL_VERSION from . import MAX_PORT_NUMBER, DEFAULT_CONFIG_DIR -from .mailaddress import MailAddress - from .xlate import XLATOR -__version__ = '0.1.8' +__version__ = '0.1.9' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -71,7 +71,7 @@ class MailConfiguration(BaseMultiConfig): current_user_name = pwd.getpwuid(os.getuid()).pw_name current_user_gecos = pwd.getpwuid(os.getuid()).pw_gecos - default_mail_from = MailAddress(current_user_name, socket.getfqdn()) + default_mail_from = MailAddress(user=current_user_name, domain=socket.getfqdn()) default_mail_from_complete = '{n} <{m}>'.format(n=current_user_gecos, m=default_mail_from) valid_mail_methods = VALID_MAIL_METHODS