HACK: Workaround remote not existing

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-09-25 22:13:44 +05:30
parent 94e6e9eca3
commit e662496374
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -28,8 +28,11 @@ repo = Repo(base_dir)
repo.create_tag(current_time)
# Nuke the remote if it existed
if repo.remote("pushback").exists():
repo.remote().remove(repo, "pushback")
try:
if repo.remote("pushback").exists():
repo.remote().remove(repo, "pushback")
except ValueError:
pass
repo.create_remote(
"pushback",
f"https://{base_repo_user}:{base_repo_pass}@git.baalajimaestro.me/baalajimaestro/{content_repo_git}.git",