From 3ae3499b70bc602c052815a8ec9cb09d9270ae5e Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Thu, 27 Apr 2023 10:44:12 +1200 Subject: tests/krb5: Create account cache key only if needed Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- python/samba/tests/krb5/kdc_base_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'python') diff --git a/python/samba/tests/krb5/kdc_base_test.py b/python/samba/tests/krb5/kdc_base_test.py index 74e6dfb406a..229ec7d8143 100644 --- a/python/samba/tests/krb5/kdc_base_test.py +++ b/python/samba/tests/krb5/kdc_base_test.py @@ -1677,9 +1677,8 @@ class KDCBaseTest(RawKerberosTest): **opts } - cache_key = tuple(sorted(account_opts.items())) - if use_cache: + cache_key = tuple(sorted(account_opts.items())) creds = self.account_cache.get(cache_key) if creds is not None: return creds -- cgit v1.2.1