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

python:tests: Simplify expression

‘not keytab_bytes’ is shorter and equivalent.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jo Sutton 2024-03-13 10:12:33 +13:00 committed by Andrew Bartlett
parent 86db305617
commit 398a555fc2

View File

@ -76,7 +76,7 @@ class DCKeytabTests(TestCaseInTempDir):
keytab_as_set.add(entry_as_tuple) keytab_as_set.add(entry_as_tuple)
keytab_bytes = multiple_entry.further_entry keytab_bytes = multiple_entry.further_entry
if keytab_bytes is None or len(keytab_bytes) == 0: if not keytab_bytes:
break break
return keytab_as_set return keytab_as_set
@ -433,7 +433,7 @@ class DCKeytabTests(TestCaseInTempDir):
while True: while True:
local_keys[local_keytab.entry.enctype] = local_keytab.entry.key.data local_keys[local_keytab.entry.enctype] = local_keytab.entry.key.data
keytab_bytes = local_keytab.further_entry keytab_bytes = local_keytab.further_entry
if keytab_bytes is None or len(keytab_bytes) == 0: if not keytab_bytes:
break break
local_keytab = ndr_unpack(krb5ccache.MULTIPLE_KEYTAB_ENTRIES, keytab_bytes) local_keytab = ndr_unpack(krb5ccache.MULTIPLE_KEYTAB_ENTRIES, keytab_bytes)