Compare commits

...

1 Commits

Author SHA1 Message Date
Zach Parks
3852a14ba2 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.
2024-06-20 14:36:41 -05:00

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