Skip to content

Commit

Permalink
Remove Python 3.9+ exclusive code from WebHost options.py.
Browse files Browse the repository at this point in the history
`str.removeprefix` was added in Python 3.9, so this causes WebHost to return a 500 error if running on Python 3.8.
  • Loading branch information
ThePhar committed Jun 20, 2024
1 parent 4f514e5 commit 3852a14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebHostLib/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def generate_yaml(game: str):
# Detect random-* keys and set their options accordingly
for key, val in options.copy().items():
if key.startswith("random-"):
options[key.removeprefix("random-")] = "random"
options[key[len("random-"):]] = "random"
del options[key]

# Error checking
Expand Down

0 comments on commit 3852a14

Please sign in to comment.