Skip to content

Commit

Permalink
Fix breaking on asc files, and raise any exception that isn't a 404
Browse files Browse the repository at this point in the history
  • Loading branch information
phit committed Feb 29, 2024
1 parent 9e6266d commit 2fd8ecc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions updateNeoforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def getSingleNeoforgeFilesManifest(longversion, legacy):

if file["type"] != 'FILE':
continue
if file["name"].endswith((".md5", ".sha1", ".sha256", ".sha512", ".pom")):
if file["name"].endswith((".md5", ".sha1", ".sha256", ".sha512", ".pom", ".asc")):
continue

fileName = file["name"]
Expand Down Expand Up @@ -134,8 +134,13 @@ def getSingleNeoforgeFilesManifest(longversion, legacy):

try:
files = getSingleNeoforgeFilesManifest(longversion, legacy)
except requests.exceptions.HTTPError as err:
if err.response.status_code == 404:
continue
else:
raise
except:
continue
raise

entry = NeoforgeEntry(
package=package,
Expand Down

0 comments on commit 2fd8ecc

Please sign in to comment.