From caf97efc0c0a5a07d3a665db062e61cb610128df Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Fri, 7 Mar 2025 12:33:02 +0100 Subject: [PATCH] also check for null --- deploy/redeploy_listener.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/redeploy_listener.py b/deploy/redeploy_listener.py index 1a21741..5f97afb 100755 --- a/deploy/redeploy_listener.py +++ b/deploy/redeploy_listener.py @@ -17,7 +17,7 @@ def main(): newest_commit_hash = os.popen("curl -s https://api.github.com/repos/Mercantec-GHC/h4-projekt-gruppe-0-sm/commits/main | jq -r .sha").read() - if not newest_commit_hash: + if not newest_commit_hash or newest_commit_hash == "null": print("error: could not fetch commit hash", file=sys.stderr) print(f"trying again in {ERROR_DELAY} seconds...", file=sys.stderr) time.sleep(ERROR_DELAY)