fix md5 not available
This commit is contained in:
parent
875b47700f
commit
0d99fcdcbc
1 changed files with 2 additions and 3 deletions
|
@ -82,8 +82,7 @@ class GameHandler:
|
|||
for chunk in r.iter_content(chunk_size=8192):
|
||||
f.write(chunk)
|
||||
md5.update(chunk)
|
||||
|
||||
if md5.hexdigest() != upload['md5_hash']:
|
||||
if 'md5_hash' in upload and md5.hexdigest() != upload['md5_hash']:
|
||||
raise HandlerException('Invalid checksum')
|
||||
|
||||
return (dst, upload, meta)
|
||||
|
@ -91,7 +90,7 @@ class GameHandler:
|
|||
|
||||
def list_local(self, games):
|
||||
table = PrettyTable(header=True, align='l', autowrap=False)
|
||||
table.field_names = ['ID', 'Title', 'Description', 'URL', 'Last update', 'Instllation path']
|
||||
table.field_names = ['ID', 'Title', 'Description', 'URL', 'Last update', 'Installation path']
|
||||
|
||||
for id, game in games.items():
|
||||
table.add_row([
|
||||
|
|
Loading…
Reference in a new issue