From b80cc3b3b6877ba13699ca2a1c1c7417389f97eb Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 23 Jun 2022 18:56:58 +0200 Subject: [PATCH] Fix typo --- mylib/ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mylib/ldap.py b/mylib/ldap.py index b35ec6d..4bf8c7d 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -24,7 +24,7 @@ DEFAULT_ENCODING = 'utf-8' def decode_ldap_value(value, encoding='utf-8'): """ Decoding LDAP attribute values helper """ if isinstance(value, bytes): - return value.decode_ldap_value(encoding) + return value.decode(encoding) if isinstance(value, list): return [decode_ldap_value(v) for v in value] if isinstance(value, dict): @@ -38,7 +38,7 @@ def decode_ldap_value(value, encoding='utf-8'): def encode_ldap_value(value, encoding='utf-8'): """ Encoding LDAP attribute values helper """ if isinstance(value, str): - return value.encode_ldap_value(encoding) + return value.encode(encoding) if isinstance(value, list): return [encode_ldap_value(v) for v in value] if isinstance(value, dict):