Remove match to retain 3.9 compatibility

This commit is contained in:
Griatch 2022-10-29 11:18:08 +02:00
parent cbfc5d6bcd
commit d0f137845d
2 changed files with 13 additions and 13 deletions

View file

@ -2,7 +2,7 @@
name: Feature request name: Feature request
about: Suggest an idea for this project about: Suggest an idea for this project
title: "[Feature Request] Enter a brief description here" title: "[Feature Request] Enter a brief description here"
labels: feature-request labels: feature-request, needs-triage
assignees: '' assignees: ''
--- ---

View file

@ -99,18 +99,18 @@ DJANGO_LT = None
with open(os.path.join(EVENNIA_LIB, "VERSION_REQS.txt")) as fil: with open(os.path.join(EVENNIA_LIB, "VERSION_REQS.txt")) as fil:
for line in fil.readlines(): for line in fil.readlines():
if line.startswith("#") or not "=" in line: if line.startswith("#") or "=" not in line:
continue continue
match tuple(part.strip() for part in line.split("=", 1)): key, *value = (part.strip() for part in line.split("=", 1))
case ("PYTHON_MIN", *value): if key == "PYTHON_MIN":
PYTHON_MIN = value[0] if value else "0" PYTHON_MIN = value[0] if value else "0"
case ("PYTHON_MAX_TESTED", *value): elif key == "PYTHON_MAX_TESTED":
PYTHON_MAX_TESTED = value[0] if value else "100" PYTHON_MAX_TESTED = value[0] if value else "100"
case ("TWISTED_MIN", *value): elif key == "TWISTED_MIN":
TWISTED_MIN = value[0] if value else "0" TWISTED_MIN = value[0] if value else "0"
case ("DJANGO_MIN", *value): elif key == "DJANGO_MIN":
DJANGO_MIN = value[0] if value else "0" DJANGO_MIN = value[0] if value else "0"
case ("DJANGO_LT", *value): elif key == "DJANGO_LT":
DJANGO_LT = value[0] if value else "100" DJANGO_LT = value[0] if value else "100"
try: try: