Message ID | 20200512000322.11753-20-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
diff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py index f4b9baac5521..3a2fb4af95c5 100644 --- a/utils/raspberrypi/ctt/ctt_tools.py +++ b/utils/raspberrypi/ctt/ctt_tools.py @@ -36,10 +36,10 @@ def get_config(dictt, key, default, ttype): if 'float' not in str(type(val)): raise ValueError elif ttype == 'dict': - if type(val) != type(dictt): + if not isinstance(val, dict): raise ValueError elif ttype == 'list': - if type(val) != type([]): + if not isinstance(val, list): raise ValueError elif ttype == 'bool': ttype = int(bool(ttype))
E721 do not compare types, use 'isinstance()' Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- utils/raspberrypi/ctt/ctt_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)