mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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
|
rustCommand = 'rust-' + debugger
|
||||||
try:
|
try:
|
||||||
subprocess.check_call([rustCommand, '--version'], env=env, stdout=open(os.devnull, 'w'))
|
subprocess.check_call([rustCommand, '--version'], env=env, stdout=open(os.devnull, 'w'))
|
||||||
command = rustCommand
|
|
||||||
except (OSError, subprocess.CalledProcessError):
|
except (OSError, subprocess.CalledProcessError):
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
command = rustCommand
|
||||||
|
|
||||||
# Prepend the debugger args.
|
# Prepend the debugger args.
|
||||||
args = ([command] + self.debuggerInfo.args +
|
args = ([command] + self.debuggerInfo.args +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue