On Mon, Feb 18, 2019 at 05:48:53PM +0100, frenzy@xxxxxxxxx wrote: > From: Lumir Balhar <lbalhar@xxxxxxxxxx> > > A list passed as an argument to check_err() means that > there is no error code to check and therefore it should > be returned back. > > Signed-off-by: Lumir Balhar <lbalhar@xxxxxxxxxx> Applied, thanks. > --- > pylibfdt/libfdt.i | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i > index 6f1f1dc..084bc5b 100644 > --- a/pylibfdt/libfdt.i > +++ b/pylibfdt/libfdt.i > @@ -137,7 +137,7 @@ def check_err(val, quiet=()): > Raises > FdtException if val < 0 > """ > - if val < 0: > + if isinstance(val, int) and val < 0: > if -val not in quiet: > raise FdtException(val) > return val -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature