From 15066559a554d38ed5d1ea6781f3be79621b20c1 Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Wed, 4 May 2016 22:02:29 +0200 Subject: [PATCH] mach run --debug: Cleanup: Use nicer syntax in rust-gdb/rust-lldb check Follow-up on f3cd5d2961d5493f17062562693608b73ced6128 : after actually reading a Python tutorial, I realised this can be handled in a more elegant fashion :-) --- python/servo/post_build_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 7bbb8c03ed5..3170e07437a 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -118,9 +118,10 @@ class PostBuildCommands(CommandBase): rustCommand = 'rust-' + debugger try: subprocess.check_call([rustCommand, '--version'], env=env, stdout=open(os.devnull, 'w')) - command = rustCommand except (OSError, subprocess.CalledProcessError): pass + else: + command = rustCommand # Prepend the debugger args. args = ([command] + self.debuggerInfo.args +