]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest: remove py2 str/bytes workaround in samr_change_password
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 11 Jun 2024 23:15:23 +0000 (11:15 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 12 Jun 2024 08:14:34 +0000 (08:14 +0000)
It is likely not necessary to cast to list().

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/dcerpc/samr_change_password.py

index f872bba128cd8c47107d1f7cd3a8627b983fcdcf..4270522c582840f5434efed1b7862daf5fa823ac 100644 (file)
@@ -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)