]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python: tests: type check should always use "is" or "is not"
authorRob van der Linde <rob@catalyst.net.nz>
Thu, 28 Mar 2024 02:59:33 +0000 (15:59 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 8 Apr 2024 03:00:39 +0000 (03:00 +0000)
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>
python/samba/tests/token_factory.py

index 9049070cf9b96c137c920477e30f978310a38f63..e4e5d87df015c9df811102eb2fdf3152664b5fdf 100644 (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: