[game-data-packager] 07/10: add assert to avoid 8d6971acb543a91b23b92bbff5407695c0188734 in the future
Simon McVittie
smcv at debian.org
Sun Jan 18 09:25:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 560a4a6ea9faa93a1f1e260a3f1da81fba047865
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sun Jan 18 09:18:10 2015 +0100
add assert to avoid 8d6971acb543a91b23b92bbff5407695c0188734 in the future
---
lib/game_data_packager/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 328d396..950d7ec 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -665,8 +665,11 @@ class GameData(object):
setattr(package, k, d[k])
if 'demo_for' in d:
+ assert package.name != d['demo_for'], "a game can't be a demo for itself"
setattr(package, 'type', 'demo')
if 'expansion_for' in d:
+ assert package.name != d['expansion_for'], \
+ "a game can't be an expansion for itself"
setattr(package, 'type', 'expansion')
if 'install' in d:
--
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