#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
+@summary: A module for providing a configuration for different things in this module.
+
@author: Frank Brehm
@contact: frank.brehm@pixelpark.com
@copyright: © 2023 by Frank Brehm, Berlin
-@summary: A module for providing a configuration for different things in this module.
"""
from __future__ import absolute_import
# Standard module
+import copy
import logging
-import pwd
-import socket
import os
-import copy
+import pwd
import re
+import socket
# Third party modules
-
-from fb_tools.multi_config import MultiConfigError, BaseMultiConfig
-from fb_tools.multi_config import DEFAULT_ENCODING
-
from fb_tools import MailAddress
+from fb_tools.multi_config import BaseMultiConfig
+from fb_tools.multi_config import DEFAULT_ENCODING
+from fb_tools.multi_config import MultiConfigError
# Own modules
-
from ..errors import PpError
-
from ..xlate import XLATOR
CONFIG_DIR = 'pixelpark'
-__version__ = '0.2.2'
+__version__ = '0.2.3'
LOG = logging.getLogger(__name__)
VALID_MAIL_METHODS = ('smtp', 'sendmail')
DEFAULT_DOMAIN = 'pixelpark.com'
# =============================================================================
class PpConfigurationError(PpError, MultiConfigError):
- """Base error class for all exceptions happened during
- evaluation of configuration."""
+ """Base error class for all exceptions happened during evaluation of configuration."""
pass
append_appname_to_stems=True, config_dir=CONFIG_DIR, additional_stems=None,
additional_cfgdirs=None, encoding=DEFAULT_ENCODING, additional_config_file=None,
ensure_privacy=False, use_chardet=True, raise_on_error=True, initialized=False):
-
+ """Initialize the PpBaseConfiguration object."""
self.mail_recipients = copy.copy(self.default_mail_recipients)
self.mail_from = self.default_mail_from_complete
self.mail_cc = copy.copy(self.default_mail_cc)
# -------------------------------------------------------------------------
def as_dict(self, short=True):
"""
- Transforms the elements of the object into a dict
+ Transform the elements of the object into a dict.
@param short: don't include local properties in resulting dict.
@type short: bool
@return: structure as dict
@rtype: dict
"""
-
res = super(PpBaseConfiguration, self).as_dict(short=short)
res['default_mail_recipients'] = self.default_mail_recipients
# =============================================================================
-if __name__ == "__main__":
+if __name__ == '__main__':
pass