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 142761 0542d2080a0400f4f5110549943cc49f1d76c234
parent 142760 4b83621ceedf0fe341a1a89a98db3f2262bba668
child 142762 543772de681ee33182817f560050e58757475b9f
push id32502
push usermh@glandium.org
push dateThu, 15 Aug 2013 14:45:54 +0000
treeherdermozilla-inbound@a5150f990fad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs905490
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.')