Guard aginst empty platform
This commit is contained in:
parent
f98e44d3c7
commit
4e994dd56a
4
build.py
4
build.py
|
@ -107,8 +107,8 @@ def build_table(index, games):
|
||||||
|
|
||||||
# actual game text
|
# actual game text
|
||||||
for game in games:
|
for game in games:
|
||||||
name = game['name']
|
name = game.get('name')
|
||||||
platform = game['platform']
|
platform = game.get('platform', '')
|
||||||
if len(platform) > MAX_WIDTH_PLATFORM:
|
if len(platform) > MAX_WIDTH_PLATFORM:
|
||||||
raise Exception(f"Platform shortcode for {name} is longer than {MAX_WIDTH_PLATFORM} characters. Invalid.")
|
raise Exception(f"Platform shortcode for {name} is longer than {MAX_WIDTH_PLATFORM} characters. Invalid.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue