File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,13 @@ def process_multidata(compressed_multidata, files={}):
63
63
game_data = games_package_schema .validate (game_data )
64
64
game_data = {key : value for key , value in sorted (game_data .items ())}
65
65
game_data ["checksum" ] = data_package_checksum (game_data )
66
- game_data_package = GameDataPackage (checksum = game_data ["checksum" ],
67
- data = pickle .dumps (game_data ))
68
66
if original_checksum != game_data ["checksum" ]:
69
67
raise Exception (f"Original checksum { original_checksum } != "
70
68
f"calculated checksum { game_data ['checksum' ]} "
71
69
f"for game { game } ." )
70
+
71
+ game_data_package = GameDataPackage (checksum = game_data ["checksum" ],
72
+ data = pickle .dumps (game_data ))
72
73
decompressed_multidata ["datapackage" ][game ] = {
73
74
"version" : game_data .get ("version" , 0 ),
74
75
"checksum" : game_data ["checksum" ],
@@ -192,6 +193,8 @@ def uploads():
192
193
res = upload_zip_to_db (zfile )
193
194
except VersionException :
194
195
flash (f"Could not load multidata. Wrong Version detected." )
196
+ except Exception as e :
197
+ flash (f"Could not load multidata. File may be corrupted or incompatible. ({ e } )" )
195
198
else :
196
199
if res is str :
197
200
return res
You can’t perform that action at this time.
0 commit comments