From e66249637428411580cbbb8777816ae97165f8b8 Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Sun, 25 Sep 2022 22:13:44 +0530 Subject: [PATCH] HACK: Workaround remote not existing Signed-off-by: baalajimaestro --- trigger.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trigger.py b/trigger.py index 73a39b6..eb82e7b 100644 --- a/trigger.py +++ b/trigger.py @@ -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",