On 18.09.18 10:21, Heinrich Schuchardt wrote:
> Spawn.exept has a try block without 'except'.
> 
> If no output is available an OSError may arise. Catch this exception and
> continue testing.

I agree with Stephen that the actual error this is trying to fix is not
obvious from the description. Could you please clarify what exactly is
going wrong and why this is the correct fix for it?


Thanks,

Alex

> 
> Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> I suggest that Alex takes the patch because we need it when working on the
> efi-next branch.
> 
> v2
>       replace TAB by spaces
>       fix typo in subject
> ---
>  test/py/u_boot_spawn.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py
> index b011a3e3da..7ee876b101 100644
> --- a/test/py/u_boot_spawn.py
> +++ b/test/py/u_boot_spawn.py
> @@ -181,6 +181,9 @@ class Spawn(object):
>                  # unlimited substitutions, but in practice the version of
>                  # Python in Ubuntu 14.04 appears to default to count=2!
>                  self.buf = self.re_vt100.sub('', self.buf, count=1000000)
> +        except OSError, EOFError:
> +            # Reading the the console may result in an error. Catch it.
> +            pass
>          finally:
>              if self.logfile_read:
>                  self.logfile_read.flush()
> 
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to