Skip to content

Commit

Permalink
Handle 404 in mod download
Browse files Browse the repository at this point in the history
  • Loading branch information
L1Z3 committed Apr 12, 2023
1 parent eb1f324 commit 0bfa93a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/multiplayer_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ def download_mod_files():

r_json = r.json()
# if the response doesn't look right, throw an error
if len(r_json) == 0 or ("message" in r_json and "rate limit" in r_json["message"]):
if len(r_json) == 0 or ("message" in r_json and ("rate limit" in r_json["message"] or
"Not Found" in r_json["message"])):
print("Error checking for mod file updates!", file=sys.stderr)
if "message" in r_json and "rate limit" in r_json["message"]:
print("(GitHub returned an API rate limit error.)", file=sys.stderr)
elif "message" in r_json and "Not Found" in r_json["message"]:
print("(GitHub returned a 404 error. Mod seems to be gone?)", file=sys.stderr)
if cur_version is None:
print("No version of BOTWM mod downloaded! Exiting installer...", file=sys.stderr)
exit(1)
Expand Down

6 comments on commit 0bfa93a

@TheDoctorHD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might we consider including the files in the download? My internet is spotty right now so I can't really tell what is going on but if it's Nintendo it might be a while before the files are back up in their usual place.

@L1Z3
Copy link
Owner Author

@L1Z3 L1Z3 commented on 0bfa93a Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda don't want to go there, don't want our repo to get the Nintendo treatment

@TheDoctorHD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, we need to get the files from somewhere though so hopefully this resolves itself soon

@L1Z3
Copy link
Owner Author

@L1Z3 L1Z3 commented on 0bfa93a Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, worst case if someone hosts an alternative download, we can pull from there, but i do not want to host the files in our repo

@TheDoctorHD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, should we also remove the grids since Nintendo seems to be aware of the mod now?

@L1Z3
Copy link
Owner Author

@L1Z3 L1Z3 commented on 0bfa93a Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah it's ok, i don't think they will care about our repo since few people know about it

Please sign in to comment.