From: Douglas Bagnall Date: Tue, 11 Jun 2024 23:15:50 +0000 (+1200) Subject: pytest: remove py2 str/bytes workaround in auth_log_samlogon X-Git-Tag: tdb-1.4.11~377 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0cf1879681c6275e2633cc370b57c91dbc5fa53;p=thirdparty%2Fsamba.git pytest: remove py2 str/bytes workaround in auth_log_samlogon It is likely not necessary to cast to list() in most cases. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/auth_log_samlogon.py b/python/samba/tests/auth_log_samlogon.py index f3dfebab0cc..8ccf9b12e95 100644 --- a/python/samba/tests/auth_log_samlogon.py +++ b/python/samba/tests/auth_log_samlogon.py @@ -126,14 +126,10 @@ class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase): logon_level = netlogon.NetlogonNetworkTransitiveInformation logon = samba.dcerpc.netlogon.netr_NetworkInfo() - logon.challenge = [ - x if isinstance(x, int) else ord(x) for x in challenge] + logon.challenge = list(challenge) logon.nt = netlogon.netr_ChallengeResponse() logon.nt.length = len(response["nt_response"]) - logon.nt.data = [ - x if isinstance(x, int) else ord(x) for - x in response["nt_response"] - ] + logon.nt.data = list(response["nt_response"]) logon.identity_info = samba.dcerpc.netlogon.netr_IdentityInfo() (username, domain) = creds.get_ntlm_username_domain()