From 8f46ca5dd20f2e69595dfb3bf9ab11d6f978dfbd Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 31 Jan 2013 11:56:00 +0100 Subject: Preserve case of attribute names in LDAPEntry. --- ipalib/plugins/baseldap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/baseldap.py') diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index da89ad6f3..20ae1cbee 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -230,7 +230,10 @@ def entry_from_entry(entry, newentry): entry[e] = newentry[e] def entry_to_dict(entry, **options): - result = dict(entry) + if options.get('raw', False): + result = dict(entry) + else: + result = dict((k.lower(), v) for (k, v) in entry.iteritems()) if options.get('all', False): result['dn'] = entry.dn return result -- cgit