Auto merge of #11013 - antrik:rust-gdb-cleanup, r=Ms2ger

mach run --debug: Use nicer syntax in rust-gdb/rust-lldb check

After actually reading a Python tutorial, I realised this can be handled
in a more elegant fashion :-)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11013)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-06 05:43:58 -07:00
commit 283eb41296

View file

@ -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 +