mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-23 21:17:50 +00:00
utils/check_output: Ensure output
and error
are always initialised.
Ensure that the `output` and `error` variables are always initialised regardless of whether an error occurs during execution.
This commit is contained in:
parent
b9d50ec164
commit
3c28c280de
@ -177,6 +177,8 @@ def check_output(command, timeout=None, ignore=None, inputtext=None, **kwargs):
|
||||
preexec_fn=preexec_function,
|
||||
**kwargs)
|
||||
|
||||
output = None
|
||||
error = None
|
||||
try:
|
||||
output, error = process.communicate(inputtext, timeout=timeout)
|
||||
except subprocess.TimeoutExpired as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user