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 a02b455a379faea8372a39c2cf1ee95f731eeebc
Author: Simon McVittie <s...@debian.org>
Date:   Fri Oct 14 11:39:01 2016 +0100

    Launcher: implement --quiet
---
 runtime/launcher.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/runtime/launcher.py b/runtime/launcher.py
index c03ff42..a6e2114 100755
--- a/runtime/launcher.py
+++ b/runtime/launcher.py
@@ -189,7 +189,7 @@ class Launcher:
         parser.add_argument('--smp', default=False, action='store_true',
                 help='use a multi-threaded game engine, if supported')
         parser.add_argument('--quiet', default=False, action='store_true',
-                help='silence console logging, if supported')
+                help='silence console logging')
         parser.add_argument('arguments', nargs=argparse.REMAINDER,
                 help='arguments for the launched game')
         self.args, rest = parser.parse_known_args(argv)
@@ -585,6 +585,11 @@ class Launcher:
         logger.debug('Executing: %r', self.argv + self.args.arguments)
         self.flush()
 
+        if self.args.quiet:
+            os.dup2(os.open(os.devnull, os.O_RDONLY), 0)
+            os.dup2(os.open(os.devnull, os.O_WRONLY), 1)
+            os.dup2(os.open(os.devnull, os.O_WRONLY), 2)
+
         os.execvpe(self.argv[0], self.argv + self.args.arguments, environ)
 
         raise AssertionError('os.execve should never return')

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to