From 332daa6e36969f933df34bf8860291d01ffb0d2a Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 18 May 2022 17:48:15 +0200 Subject: [PATCH] Output of read configuration files with bin/dpx-show-mail-ldap-config --- lib/pp_admintools/show_ldap_mail_config.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/pp_admintools/show_ldap_mail_config.py b/lib/pp_admintools/show_ldap_mail_config.py index e77c23c..8c6efc8 100644 --- a/lib/pp_admintools/show_ldap_mail_config.py +++ b/lib/pp_admintools/show_ldap_mail_config.py @@ -34,7 +34,7 @@ from .ldap_app import LdapAppError, BaseLdapApplication from .xlate import XLATOR -__version__ = '0.2.0' +__version__ = '0.2.1' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -125,6 +125,9 @@ class ShowMailLdapConfigApp(BaseMailApplication, BaseLdapApplication): print('') self.show_ldap_config() + self.show_base_config() + + print('') # ------------------------------------------------------------------------- def show_ldap_config(self): @@ -209,6 +212,21 @@ class ShowMailLdapConfigApp(BaseMailApplication, BaseLdapApplication): for connection in conn_list: print(template.format(**connection)) + # ------------------------------------------------------------------------- + def show_base_config(self): + + print('') + + title = _("Configuration was read from:") + title_length = len(title) + print(title) + print('-' * title_length) + print('') + + print(" * <" + _('Application defaults') + '>') + + for cfg_file in self.cfg.config_files: + print(" * {!r}".format(str(cfg_file))) # ============================================================================= -- 2.39.5