west: runners: core.py: Remove no-op try-excepts
Removing these doesn't change behavior, since the subprocess.CalledProcessError is just immediately re-raised when caught. Fixes this pylint warning: W0706: The except handler raises immediately (try-except-raise) Fixing pylint warnings for a CI check. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
4094ee686e
commit
d2d5fae838
1 changed files with 2 additions and 8 deletions
|
@ -516,10 +516,7 @@ class ZephyrBinaryRunner(abc.ABC):
|
|||
self._log_cmd(cmd)
|
||||
if _DRY_RUN:
|
||||
return
|
||||
try:
|
||||
subprocess.check_call(cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
raise
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
def check_output(self, cmd):
|
||||
'''Subclass subprocess.check_output() wrapper.
|
||||
|
@ -531,10 +528,7 @@ class ZephyrBinaryRunner(abc.ABC):
|
|||
self._log_cmd(cmd)
|
||||
if _DRY_RUN:
|
||||
return b''
|
||||
try:
|
||||
return subprocess.check_output(cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
raise
|
||||
return subprocess.check_output(cmd)
|
||||
|
||||
def popen_ignore_int(self, cmd):
|
||||
'''Spawn a child command, ensuring it ignores SIGINT.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue