From b31cca5e310497d863e93c73bc76e7da0cb10855 Mon Sep 17 00:00:00 2001 From: Zander <28664144+ZandercraftGames@users.noreply.github.com> Date: Sat, 15 May 2021 19:02:09 -0400 Subject: [PATCH] Fix findLatestBuild check returning false on a successful API response. --- src/serverjar/serverjar_paper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serverjar/serverjar_paper.py b/src/serverjar/serverjar_paper.py index 2146eba..f238e2f 100644 --- a/src/serverjar/serverjar_paper.py +++ b/src/serverjar/serverjar_paper.py @@ -76,7 +76,7 @@ def findLatestBuild(paperVersionGroup): return False url = f"https://papermc.io/api/v2/projects/paper/version_group/{paperVersionGroup}/builds" papermcbuilds = doAPIRequest(url) - if papermcbuilds["status"] == 404: + if "status" in papermcbuilds: # Checks if the API returns a status. This means that there was an error. return False latestPaperBuild = papermcbuilds["builds"][-1]["build"] return latestPaperBuild