Bug 905490 - Avoid "mach python" logging the python command. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 Aug 2013 23:45:09 +0900
changeset 142778 0542d2080a0400f4f5110549943cc49f1d76c234
parent 142777 4b83621ceedf0fe341a1a89a98db3f2262bba668
child 142779 543772de681ee33182817f560050e58757475b9f
push idunknown
push userunknown
push dateunknown
reviewersgps
bugs905490
milestone26.0a1
Bug 905490 - Avoid "mach python" logging the python command. r=gps
python/mach_commands.py
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -51,16 +51,18 @@ class MachCommands(MachCommandBase):
         self._python_executable = path
         return path
 
     @Command('python', category='devenv',
         allow_all_args=True,
         description='Run Python.')
     @CommandArgument('args', nargs=argparse.REMAINDER)
     def python(self, args):
+        # Avoid logging the command
+        self.log_manager.terminal_handler.setLevel(logging.CRITICAL)
         return self.run_process([self.python_executable] + args,
             pass_thru=True, # Allow user to run Python interactively.
             ensure_exit_code=False, # Don't throw on non-zero exit code.
             # Note: subprocess requires native strings in os.environ on Windows
             append_env={b'PYTHONDONTWRITEBYTECODE': str('1')})
 
     @Command('python-test', category='testing',
         description='Run Python unit tests.')