mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-28 00:06:11 -04:00
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>
This commit is contained in:
parent
4b68c6b360
commit
cb0f454f73
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue