mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
patman: Adjust command.Output() to raise an error by default
It is more useful to have this method raise an error when something goes wrong. Make this the default and adjust the few callers that don't want to use it this way. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -104,8 +104,9 @@ def RunPipe(pipe_list, infile=None, outfile=None,
|
||||
raise Exception("Error running '%s'" % user_pipestr)
|
||||
return result
|
||||
|
||||
def Output(*cmd):
|
||||
return RunPipe([cmd], capture=True, raise_on_error=False).stdout
|
||||
def Output(*cmd, **kwargs):
|
||||
raise_on_error = kwargs.get('raise_on_error', True)
|
||||
return RunPipe([cmd], capture=True, raise_on_error=raise_on_error).stdout
|
||||
|
||||
def OutputOneLine(*cmd, **kwargs):
|
||||
raise_on_error = kwargs.pop('raise_on_error', True)
|
||||
|
Reference in New Issue
Block a user