diff --git a/CHANGES b/CHANGES index 8c6dde4..f4be1fc 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Lib/ * right after importing _ldap there is a call into libldap to initialize it * method .decodeControlValue() of SSSResponseControl and VLVResponseControl does not set class attribute result_code anymore +* always use bytes() for UUID() constructor in ldap.syncrepl Tests/ * scripts do not directly call SlapdTestCase.setUpClass() anymore diff --git a/Lib/ldap/syncrepl.py b/Lib/ldap/syncrepl.py index 94a7217..93a3a2a 100644 --- a/Lib/ldap/syncrepl.py +++ b/Lib/ldap/syncrepl.py @@ -130,7 +130,7 @@ class SyncStateControl(ResponseControl): def decodeControlValue(self, encodedControlValue): d = decoder.decode(encodedControlValue, asn1Spec = syncStateValue()) state = d[0].getComponentByName('state') - uuid = UUID(bytes=d[0].getComponentByName('entryUUID')) + uuid = UUID(bytes=bytes(d[0].getComponentByName('entryUUID'))) cookie = d[0].getComponentByName('cookie') if cookie.hasValue(): self.cookie = str(self.cookie) @@ -287,7 +287,7 @@ def __init__(self, encodedMessage): uuids = [] ids = comp.getComponentByName('syncUUIDs') for i in range(len(ids)): - uuid = UUID(bytes=str(ids.getComponentByPosition(i))) + uuid = UUID(bytes=bytes(ids.getComponentByPosition(i))) uuids.append(str(uuid)) val['syncUUIDs'] = uuids val['refreshDeletes'] = bool(comp.getComponentByName('refreshDeletes'))