pylibfdt: check_err accepts only integer as a first argument.
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@redhat.com> Message-Id: <20190218164856.23861-2-frenzy@frenzy.cz> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
4b68c6b360
commit
cb0f454f73
|
@ -137,7 +137,7 @@ def check_err(val, quiet=()):
|
||||||
Raises
|
Raises
|
||||||
FdtException if val < 0
|
FdtException if val < 0
|
||||||
"""
|
"""
|
||||||
if val < 0:
|
if isinstance(val, int) and val < 0:
|
||||||
if -val not in quiet:
|
if -val not in quiet:
|
||||||
raise FdtException(val)
|
raise FdtException(val)
|
||||||
return val
|
return val
|
||||||
|
|
Loading…
Reference in New Issue