Message ID | 1467560446-10628-8-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Commit | f3d3e95ce5d26777a6a138635f9bb12ca7ccf6fa |
Delegated to: | Tom Rini |
Headers | show |
Hi Simon, On Sun, Jul 3, 2016 at 8:40 AM, Simon Glass <sjg@chromium.org> wrote: > It is useful to be able to obtain the output from a command. Return it from > this function. > > Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Teddy Reed <teddy.reed@gmail.com> > --- > > test/py/u_boot_utils.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py > index 6a6b2ec..5dc0f71 100644 > --- a/test/py/u_boot_utils.py > +++ b/test/py/u_boot_utils.py > @@ -165,12 +165,13 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False): > problems occur. > > Returns: > - Nothing. > + The output as a string. > """ > > runner = u_boot_console.log.get_runner(cmd[0], sys.stdout) > - runner.run(cmd, ignore_errors=ignore_errors) > + output = runner.run(cmd, ignore_errors=ignore_errors) > runner.close() > + return output > > ram_base = None > def find_ram_base(u_boot_console): > -- > 2.8.0.rc3.226.g39d4020 > > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot
On Sun, Jul 03, 2016 at 09:40:39AM -0600, Simon Glass wrote: > It is useful to be able to obtain the output from a command. Return it from > this function. > > Signed-off-by: Simon Glass <sjg@chromium.org> > Reviewed-by: Teddy Reed <teddy.reed@gmail.com> Applied to u-boot/master, thanks!
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py index 6a6b2ec..5dc0f71 100644 --- a/test/py/u_boot_utils.py +++ b/test/py/u_boot_utils.py @@ -165,12 +165,13 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False): problems occur. Returns: - Nothing. + The output as a string. """ runner = u_boot_console.log.get_runner(cmd[0], sys.stdout) - runner.run(cmd, ignore_errors=ignore_errors) + output = runner.run(cmd, ignore_errors=ignore_errors) runner.close() + return output ram_base = None def find_ram_base(u_boot_console):
It is useful to be able to obtain the output from a command. Return it from this function. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/py/u_boot_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)