From: Douglas Bagnall Date: Tue, 11 Jun 2024 23:15:23 +0000 (+1200) Subject: pytest: remove py2 str/bytes workaround in samr_change_password X-Git-Tag: tdb-1.4.11~378 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd3792005ba907cf43310c1b0cd75fb7a8818630;p=thirdparty%2Fsamba.git pytest: remove py2 str/bytes workaround in samr_change_password It is likely not necessary to cast to list(). Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/dcerpc/samr_change_password.py b/python/samba/tests/dcerpc/samr_change_password.py index f872bba128c..4270522c582 100644 --- a/python/samba/tests/dcerpc/samr_change_password.py +++ b/python/samba/tests/dcerpc/samr_change_password.py @@ -114,7 +114,7 @@ class SamrPasswordTests(RpcInterfaceTestCase): def encode_pw_buffer(password): data = bytearray([0] * 516) - p = samba.string_to_byte_array(password.encode('utf-16-le')) + p = list(password.encode('utf-16-le')) plen = len(p) b = generate_random_bytes(512 - plen)