From: Frank Brehm Date: Wed, 25 Sep 2019 13:20:32 +0000 (+0200) Subject: Showing relative paths on not existing config files X-Git-Tag: 1.3.3~1 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=0f2a2fb90cb4578359426084d98837ab5990da31;p=pixelpark%2Fcreate-terraform.git Showing relative paths on not existing config files --- diff --git a/lib/cr_tf/__init__.py b/lib/cr_tf/__init__.py index 72c7bad..5906457 100644 --- a/lib/cr_tf/__init__.py +++ b/lib/cr_tf/__init__.py @@ -1,7 +1,7 @@ #!/bin/env python3 # -*- coding: utf-8 -*- -__version__ = '1.3.1' +__version__ = '1.3.2' MIN_VERSION_TERRAFORM = '0.12.0' MAX_VERSION_TERRAFORM = '0.12.99' diff --git a/lib/cr_tf/app.py b/lib/cr_tf/app.py index 1aeba33..eccc00f 100644 --- a/lib/cr_tf/app.py +++ b/lib/cr_tf/app.py @@ -43,7 +43,7 @@ from .xlate import __base_dir__ as __xlate_base_dir__ from .xlate import __mo_file__ as __xlate_mo_file__ from .xlate import XLATOR, LOCALE_DIR, DOMAIN -__version__ = '1.0.5' +__version__ = '1.0.6' LOG = logging.getLogger(__name__) SIGNAL_NAMES = { @@ -217,10 +217,13 @@ class CrTfApplication(BaseApplication): if not self.cfg_file.exists(): default_conf_file = self.cfg_dir.joinpath(CFGFILE_BASENAME + '.default') + cur_dir = Path(os.getcwd()) + cfg_file_rel = os.path.relpath(str(self.cfg_file), str(cur_dir)) + default_cfg_file_rel = os.path.relpath(str(default_conf_file), str(cur_dir)) msg = (_( "Configuration file {f!r} does not exists. Please copy {d!r} to {f!r} and " "fill out all necessary entries, e.g. the passwords and API keys.").format( - f=str(self.cfg_file), d=str(default_conf_file))) + f=cfg_file_rel, d=default_cfg_file_rel)) LOG.error(msg) self.exit(1)