Remove Python 3.9+ exclusive code from WebHost options.py.

`str.removeprefix` was added in Python 3.9, so this causes WebHost to return a 500 error if running on Python 3.8.
This commit is contained in:
Zach Parks
2024-06-20 14:36:41 -05:00
parent 4f514e5944
commit 3852a14ba2

View File

@@ -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