From 3852a14ba2da8b33f30532108a0186dfce3e960e Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Thu, 20 Jun 2024 14:36:41 -0500 Subject: [PATCH] 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. --- WebHostLib/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/options.py b/WebHostLib/options.py index 33339daa19..55d91b3f13 100644 --- a/WebHostLib/options.py +++ b/WebHostLib/options.py @@ -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