From 5eae9092937043c307acc5190543c7088d8196f1 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 2 May 2020 03:32:00 +0300 Subject: utils: raspberrypi: ctt: Fix pycodestyle E721 E721 do not compare types, use 'isinstance()' Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: David Plowman --- utils/raspberrypi/ctt/ctt_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py index f4b9baac..3a2fb4af 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)) -- cgit v1.2.1