[game-data-packager] 21/24: main: add ability to use package name as a shortname
Simon McVittie
smcv at debian.org
Sat Jan 17 23:28:51 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 dcfff4077b43277ec16af74d30942373c1aba1dd
Author: Simon McVittie <smcv at debian.org>
Date: Sat Jan 17 23:20:57 2015 +0000
main: add ability to use package name as a shortname
---
lib/game_data_packager/__init__.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 33920fd..340455c 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1985,5 +1985,14 @@ def run_command_line():
parsed.save_downloads)
sys.exit(2)
- with games[parsed.shortname] as game:
+ if parsed.shortname in games:
+ game = games[parsed.shortname]
+ else:
+ for game in games.values():
+ if parsed.shortname in game.packages:
+ break
+ else:
+ raise AssertionError('could not find %s' % parsed.shortname)
+
+ with game:
game.run_command_line(parsed)
--
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