squashed commit of many breaking changes

Dropping Support for Python 3.7; adding support for Python 3.9
This commit is contained in:
Fabian Dill
2020-10-19 08:26:31 +02:00
parent add0762114
commit 4f8c737eec
16 changed files with 149 additions and 150 deletions

View File

@@ -8,7 +8,7 @@ from pony.orm import commit, select
from WebHostLib import app, Seed, Room, Patch
accepted_zip_contents = {"patches": ".bmbp",
accepted_zip_contents = {"patches": ".apbp",
"spoiler": ".txt",
"multidata": "multidata"}
@@ -38,7 +38,7 @@ def uploads():
for file in infolist:
if file.filename.endswith(banned_zip_contents):
return "Uploaded data contained a rom file, which is likely to contain copyrighted material. Your file was deleted."
elif file.filename.endswith(".bmbp"):
elif file.filename.endswith(".apbp"):
player = int(file.filename.split("P")[1].split(".")[0].split("_")[0])
patches.add(Patch(data=zfile.open(file, "r").read(), player=player))
elif file.filename.endswith(".txt"):