Webhost race support as a non-breaking change

This commit is contained in:
Fabian Dill
2020-10-30 00:09:47 +01:00
parent 5f535012f3
commit aab3a3496a
4 changed files with 55 additions and 24 deletions

View File

@@ -37,9 +37,10 @@ def download_raw_patch(seed_id, player_id):
return "Patch not found"
else:
import io
pname = patch.seed.multidata["names"][0][patch.player - 1]
if patch.seed.multidata:
pname = patch.seed.multidata["names"][0][patch.player - 1]
else:
pname = "unknown"
patch_data = update_patch_data(patch.data, server="")
patch_data = io.BytesIO(patch_data)