1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python:tests: Rewrite condition of while loop

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jo Sutton 2024-04-24 13:37:40 +12:00 committed by Andrew Bartlett
parent cb97e3f13d
commit 6f12cf958f

View File

@ -67,7 +67,7 @@ class DCKeytabTests(TestCaseInTempDir):
keytab_as_set.add(entry_as_tuple)
keytab_bytes = keytab.further_entry
while True:
while keytab_bytes:
multiple_entry = ndr_unpack(krb5ccache.MULTIPLE_KEYTAB_ENTRIES, keytab_bytes)
entry = multiple_entry.entry
entry_as_tuple = entry_to_tuple(entry)
@ -75,8 +75,6 @@ class DCKeytabTests(TestCaseInTempDir):
keytab_as_set.add(entry_as_tuple)
keytab_bytes = multiple_entry.further_entry
if not keytab_bytes:
break
return keytab_as_set