[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: Gracefully die when no "env fi
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: Gracefully die when no "env file" is found. |
Date: |
Wed, 27 Nov 2019 11:53:16 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 99171f1 Gracefully die when no "env file" is found.
99171f1 is described below
commit 99171f18125a356fb263eae6833f1e6d4e6bcec8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Nov 27 11:52:45 2019 +0100
Gracefully die when no "env file" is found.
---
bin/taler-deployment | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
index abfd698..637a784 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -433,7 +433,10 @@ allowed_envs = (
def load_envcfg():
cfg = types.ModuleType("taler_deployment_cfg")
- cfgtext = (Path.home() / "envcfg.py").read_text()
+ envcfg_path = Path.home() / "envcfg.py"
+ if not os.path.isfile(envcfg_path):
+ return None
+ cfgtext = envcfg_path.read_text()
exec(cfgtext, cfg.__dict__)
return cfg
@@ -452,6 +455,9 @@ def build() -> None:
"""Build the deployment from source."""
ensure_activated()
cfg = load_envcfg()
+ if not cfg:
+ print("Please create ~/envcfg.py (template in deployment.git can
help)")
+ return 1
env_info = get_env_info(cfg)
update_repos(env_info.repos)
stale = get_stale_repos(env_info.repos)
@@ -484,6 +490,9 @@ def bootstrap() -> None:
home = Path.home()
cfg = load_envcfg()
+ if not cfg:
+ print("Please create ~/envcfg.py (template in deployment.git can
help)")
+ return 1
env_info = get_env_info(cfg)
repos = env_info.repos
envname = env_info.name
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: Gracefully die when no "env file" is found.,
gnunet <=