[game-data-packager] 01/03: html: don't fail on games with genre: not set

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sun Oct 11 08:43:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 2959a77bbaa53b7e96517e02d56d2e4b692597b8
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sun Oct 11 10:39:32 2015 +0200

    html: don't fail on games with genre: not set
---
 tools/babel.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/babel.py b/tools/babel.py
index 6f4fdb6..22cb7ee 100755
--- a/tools/babel.py
+++ b/tools/babel.py
@@ -50,9 +50,9 @@ for name, game in load_games().items():
                      fullfree = False
             else:
                  somefree = True
-
-    genres[game.genre] = genres.get(game.genre, 0) + 1
-    stats['genre'] = game.genre
+    genre = game.genre or 'Unknown'
+    genres[genre] = genres.get(genre, 0) + 1
+    stats['genre'] = genre
     stats['shortname'] = name
     stats['longname'] = game.longname
     stats['url_wiki'] = game.wikibase + (game.wiki or '')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list