mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
mach run --debug: Cleanup: Use nicer syntax in rust-gdb/rust-lldb check
Follow-up on f3cd5d2961
: after actually
reading a Python tutorial, I realised this can be handled in a more
elegant fashion :-)
This commit is contained in:
parent
a868bb2a90
commit
15066559a5
1 changed files with 2 additions and 1 deletions
|
@ -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 +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue