Add packages in setup.cfg

This commit is contained in:
Yohan Boniface 2019-03-24 16:13:37 +01:00
parent 2eaac8cf17
commit ce8003114d
2 changed files with 6 additions and 1 deletions

View file

@ -178,15 +178,19 @@ def upload_env():
"COPANIER_SMTP_LOGIN": None,
}
content = ""
table = str.maketrans({'"': r"\""})
for key, value in vars_.items():
value = value or os.environ[key]
try:
content += "{}={}\n".format(key, value or os.environ[key])
content += f'{key}="{str(value).translate(table)}"\n'
except KeyError:
sys.exit(f"The {key} environment variable does not exist.")
path = "/srv/copanier/env"
if exists(path):
run(f"cat {path}")
put(StringIO(content), path)
if exists(path):
run(f"cat {path}")
@minicli.wrap

View file

@ -3,6 +3,7 @@ name = copanier
version = 0.0.1
[options]
packages = find:
install_requires =
Jinja2==2.10
minicli==0.4.4