]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Showing relative paths on not existing config files
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Sep 2019 13:20:32 +0000 (15:20 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Sep 2019 13:20:32 +0000 (15:20 +0200)
lib/cr_tf/__init__.py
lib/cr_tf/app.py

index 72c7bad37dd4e5b759d305c9d821a88f0de52614..59064570f548cf73975ad409b0c85da1fda11963 100644 (file)
@@ -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'
index 1aeba33ac55bd201e76e26ee617fb2fa9bd685cc..eccc00f19acaf1d2bf9081584680e6bc59f867c1 100644 (file)
@@ -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)