utils: raspberrypi: ctt: Fix pycodestyle E721

E721 do not compare types, use 'isinstance()'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
This commit is contained in:
Laurent Pinchart 2020-05-02 03:32:00 +03:00
parent f8e9810020
commit 5eae909293

View file

@ -36,10 +36,10 @@ def get_config(dictt, key, default, ttype):
if 'float' not in str(type(val)): if 'float' not in str(type(val)):
raise ValueError raise ValueError
elif ttype == 'dict': elif ttype == 'dict':
if type(val) != type(dictt): if not isinstance(val, dict):
raise ValueError raise ValueError
elif ttype == 'list': elif ttype == 'list':
if type(val) != type([]): if not isinstance(val, list):
raise ValueError raise ValueError
elif ttype == 'bool': elif ttype == 'bool':
ttype = int(bool(ttype)) ttype = int(bool(ttype))