[game-data-packager] 06/14: Launcher: pass on unrecognised -arguments to the engine
Simon McVittie
smcv at debian.org
Fri Oct 14 11:32:03 UTC 2016
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 d506b3e851bba151fff235c39f77508ec708d69f
Author: Simon McVittie <smcv at debian.org>
Date: Fri Oct 14 11:28:50 2016 +0100
Launcher: pass on unrecognised -arguments to the engine
---
runtime/launcher.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/runtime/launcher.py b/runtime/launcher.py
index fa8ea1d..413b22d 100755
--- a/runtime/launcher.py
+++ b/runtime/launcher.py
@@ -176,7 +176,8 @@ class Launcher:
name = name[:-3]
parser = argparse.ArgumentParser(
- description="game-data-packager's game launcher")
+ description="game-data-packager's game launcher",
+ allow_abbrev=False)
parser.add_argument('--id', default=name,
help='identity of launched game (default: from argv[0])')
parser.add_argument('--demo', default=False, action='store_true',
@@ -189,9 +190,10 @@ class Launcher:
help='use a multi-threaded game engine, if supported')
parser.add_argument('--quiet', default=False, action='store_true',
help='silence console logging, if supported')
- parser.add_argument('arguments', nargs='*',
+ parser.add_argument('arguments', nargs=argparse.REMAINDER,
help='arguments for the launched game')
- self.args = parser.parse_args(argv)
+ self.args, rest = parser.parse_known_args(argv)
+ self.args.arguments.extend(rest)
self.id = self.args.id
self.keyfile = GLib.KeyFile()
--
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