1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

python: tests: type check should always use "is" or "is not"

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Rob van der Linde 2024-03-28 15:59:33 +13:00 committed by Andrew Bartlett
parent e388bf4b4a
commit 8f7ff1c7ef

View File

@ -47,7 +47,7 @@ def list_to_claim(k, v, case_sensitive=False):
t = type(v[0])
c.value_type = CLAIM_VAL_TYPES[t]
for val in v[1:]:
if type(val) != t:
if type(val) is not t:
raise TypeError(f"claim values for '{k}' "
"should all be the same type")
else: