From de19f4d6753aa891a7d55d041f89341b109b9937 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 12 Jun 2024 11:11:27 +1200 Subject: [PATCH] s4/pytest: remove py2 str/bytes workaround in getnc_exop Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- source4/torture/drs/python/getnc_exop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/torture/drs/python/getnc_exop.py b/source4/torture/drs/python/getnc_exop.py index 0f12d9b27d7..03b93657458 100644 --- a/source4/torture/drs/python/getnc_exop.py +++ b/source4/torture/drs/python/getnc_exop.py @@ -1093,7 +1093,7 @@ class DrsReplicaPrefixMapTestCase(drs_base.DrsBaseTestCase): schi = drsuapi.DsReplicaOIDMapping() schi.id_prefix = 0 if 'schemaInfo' in res[0]: - binary_oid = [x if isinstance(x, int) else ord(x) for x in res[0]['schemaInfo'][0]] + binary_oid = list(res[0]['schemaInfo'][0]) schi.oid.length = len(binary_oid) schi.oid.binary_oid = binary_oid else: @@ -1102,7 +1102,7 @@ class DrsReplicaPrefixMapTestCase(drs_base.DrsBaseTestCase): schema_info.marker = 0xFF schema_info.invocation_id = misc.GUID(samdb.get_invocation_id()) - binary_oid = [x if isinstance(x, int) else ord(x) for x in ndr_pack(schema_info)] + binary_oid = list(ndr_pack(schema_info)) # you have to set the length before setting binary_oid schi.oid.length = len(binary_oid) schi.oid.binary_oid = binary_oid