summaryrefslogtreecommitdiff
path: root/bin/taler-deployment
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-05-18 08:59:45 +0200
committerMS <ms@taler.net>2021-05-18 08:59:45 +0200
commit49cfd3605e2c668f907335a39fce7f0780dace91 (patch)
tree26f262e15cbd0bc3765169b7d4d9e70cc5b66328 /bin/taler-deployment
parent7e7d831a6eaff1ce01285005eb2fc3d5d907675e (diff)
downloaddeployment-49cfd3605e2c668f907335a39fce7f0780dace91.tar.gz
deployment-49cfd3605e2c668f907335a39fce7f0780dace91.tar.bz2
deployment-49cfd3605e2c668f907335a39fce7f0780dace91.zip
preferring pathlib
Diffstat (limited to 'bin/taler-deployment')
-rwxr-xr-xbin/taler-deployment8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/taler-deployment b/bin/taler-deployment
index 54b30bb..adcdd41 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -57,8 +57,6 @@ export TALER_COVERAGE={coverage}
export TALER_ENV_FRONTENDS_APITOKEN="$(cat ~/merchant_auth_token)"
"""
-TOKEN_FILE = "~/merchant_auth_token"
-
@dataclass
class Repo:
name: str
@@ -689,9 +687,11 @@ def bootstrap() -> None:
if deployment_path not in path_list:
path_list.insert(0, deployment_path)
- if not os.path.isfile(TOKEN_FILE):
- with open(TOKEN_FILE, "w") as f:
+ token_file = Path.home() / "merchant_auth_token"
+ if not token_file.is_file():
+ with token_file.open("w") as f:
f.write(generate_apitoken())
+ print(f"Token file '{token_file}' created.")
with (home / "activate").open("w") as f:
f.write(