From: Frank Brehm Date: Mon, 6 Feb 2023 14:32:25 +0000 (+0100) Subject: Minor changes X-Git-Tag: 0.3.0~2^2~78 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=fb4ecdc9a46b830f96b54c638f5b3623723cf57f;p=pixelpark%2Fpuppet-tools.git Minor changes --- diff --git a/lib/dpx_puppettools/app/__init__.py b/lib/dpx_puppettools/app/__init__.py index 09e54e0..1b7c55b 100644 --- a/lib/dpx_puppettools/app/__init__.py +++ b/lib/dpx_puppettools/app/__init__.py @@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__) _ = XLATOR.gettext ngettext = XLATOR.ngettext -__version__ = '0.1.1' +__version__ = '0.1.2' # ============================================================================= @@ -56,14 +56,14 @@ class BaseDPXPuppetApplication(FbConfigApplication): # ------------------------------------------------------------------------- def __init__( - self, appname=None, verbose=0, version=GLOBAL_VERSION, base_dir=None, + self, appname=None, verbose=0, version=GLOBAL_VERSION, base_dir=None, quiet=False, cfg_class=BaseMultiConfig, initialized=False, usage=None, description=None, argparse_epilog=None, argparse_prefix_chars='-', env_prefix=None, config_dir=DEFAULT_CONFIG_DIR): super(BaseDPXPuppetApplication, self).__init__( appname=appname, verbose=verbose, version=version, base_dir=base_dir, - description=description, cfg_class=cfg_class, initialized=False, + description=description, cfg_class=cfg_class, initialized=False, quiet=quiet, argparse_epilog=argparse_epilog, argparse_prefix_chars=argparse_prefix_chars, env_prefix=env_prefix, config_dir=config_dir ) diff --git a/lib/dpx_puppettools/config.py b/lib/dpx_puppettools/config.py index 1beea7b..75a198d 100644 --- a/lib/dpx_puppettools/config.py +++ b/lib/dpx_puppettools/config.py @@ -110,7 +110,7 @@ class DpxPuppetConfig(BaseMultiConfig): else: add_stems.append(additional_stems) - for stem in ('mail', 'hooks'): + for stem in ('mail', 'puppet-tools'): if stem not in add_stems: add_stems.append(stem) @@ -214,7 +214,7 @@ class DpxPuppetConfig(BaseMultiConfig): result = [] - tokens = self.whitespace_re.split(value) + tokens = self.re_whitespace.split(value) for token in tokens: if MailAddress.valid_address(token): result.append(token) diff --git a/test/test_10_config.py b/test/test_10_config.py index 0db551b..b7b87a9 100755 --- a/test/test_10_config.py +++ b/test/test_10_config.py @@ -70,7 +70,7 @@ class TestConfig(DpxPuppetToolsTestcase): cfg = DpxPuppetConfig( appname=self.appname, - config_dir='test', additional_stems='test', + additional_cfgdirs=self.test_cfg_dir, additional_stems='test', verbose=self.verbose, ) LOG.debug("DpxPuppetConfig %%r: %r", cfg) diff --git a/test/test_15_base_app.py b/test/test_15_base_app.py index 3335a90..ade1b12 100755 --- a/test/test_15_base_app.py +++ b/test/test_15_base_app.py @@ -50,8 +50,7 @@ class TestBaseApp(DpxPuppetToolsTestcase): quiet = True app = BaseDPXPuppetApplication( - appname=self.appname, verbose=self.verbose) - app.quiet = quiet + appname=self.appname, quiet=quiet, verbose=self.verbose) LOG.debug("Drawing lines ...") app.empty_line()