From 4e994dd56a7646841c672a993fdd34297578cde6 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..e80b2ca 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', '') if len(platform) > MAX_WIDTH_PLATFORM: raise Exception(f"Platform shortcode for {name} is longer than {MAX_WIDTH_PLATFORM} characters. Invalid.")