From 9beb467d98cb16e09fcda5ebbeb27056dfff3a2d Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 1 Nov 2011 08:58:05 -0400 Subject: Fix attempted write to attribute of read-only object. Add new class "cachedproperty" for creating property-like attributes that cache the return value of a method call. Also fix few issues in the unit tests to enable them to succeed. ticket 1959 --- ipaserver/ipaldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipaserver/ipaldap.py') diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py index ae36dd23..4dca6046 100644 --- a/ipaserver/ipaldap.py +++ b/ipaserver/ipaldap.py @@ -314,7 +314,7 @@ class IPAdmin(IPAEntryLDAPObject): raise errors.DuplicateEntry() except ldap.CONSTRAINT_VIOLATION, e: # This error gets thrown by the uniqueness plugin - if info == 'Another entry with the same attribute value already exists': + if info.startswith('Another entry with the same attribute value already exists'): raise errors.DuplicateEntry() else: raise errors.DatabaseError(desc=desc,info=info) -- cgit