From 2d17de78abfbff694e1ff386b55b8de098fb0816 Mon Sep 17 00:00:00 2001 From: fanyx Date: Thu, 31 Aug 2023 13:40:42 +0200 Subject: [PATCH] Guard aginst empty platform --- build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index eb7e348..1b0d124 100755 --- a/build.py +++ b/build.py @@ -107,8 +107,8 @@ def build_table(index, games): # actual game text for game in games: - name = game['name'] - platform = game['platform'] + name = game.get('name') + platform = game.get('platform') or "" if len(platform) > MAX_WIDTH_PLATFORM: raise Exception(f"Platform shortcode for {name} is longer than {MAX_WIDTH_PLATFORM} characters. Invalid.")