Skip to content

Commit

Permalink
clever-deploy: Use new delete_on_close argument
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisfreitag committed Nov 6, 2024
1 parent 4910f06 commit 9b38b67
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/clever-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def deploy():

known_deployment_uids = {d["uuid"] for d in get_deployments(clever_cli, app_alias)}

# TODO(xfernandez: switch to delete_on_close=False in 3.12
with tempfile.NamedTemporaryFile(prefix="clever_git_alias", delete=False) as f:
with tempfile.NamedTemporaryFile(prefix="clever_git_alias", delete_on_close=False) as f:
f.write(b"""#!/bin/bash
case "$1" in
Username*) echo "$CLEVER_TOKEN" ;;
Expand All @@ -55,7 +54,6 @@ esac
"GIT_ASKPASS": f.name,
},
)
os.remove(f.name)

for _attempt in range(10):
new_deployments = [d for d in get_deployments(clever_cli, app_alias) if d["uuid"] not in known_deployment_uids]
Expand Down

0 comments on commit 9b38b67

Please sign in to comment.