diff options
author | Lumir Balhar <lbalhar@redhat.com> | 2019-02-18 17:48:53 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-02-19 13:49:27 +1100 |
commit | cb0f454f73cc85019b0b844e3fd66caa2d219d5c (patch) | |
tree | 9362c073da7c0793e791f8ed165f0e20c7fb6b20 | |
parent | 4b68c6b3605ac3ef47e1594c0cde415f6f286134 (diff) | |
download | dtc-cb0f454f73cc85019b0b844e3fd66caa2d219d5c.zip dtc-cb0f454f73cc85019b0b844e3fd66caa2d219d5c.tar.gz dtc-cb0f454f73cc85019b0b844e3fd66caa2d219d5c.tar.bz2 |
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>
-rw-r--r-- | pylibfdt/libfdt.i | 2 |
1 files changed, 1 insertions, 1 deletions
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 |