summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/ldap2.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-11-01 08:58:05 -0400
committerAlexander Bokovoy <abokovoy@redhat.com>2012-01-02 11:51:26 +0300
commit9beb467d98cb16e09fcda5ebbeb27056dfff3a2d (patch)
treed374273454f5fa5627eb1fe83782c437cdbddde2 /ipaserver/plugins/ldap2.py
parent46d3abc450db20c3e4c0854dbf9e711f59db3bff (diff)
downloadfreeipa.git-9beb467d98cb16e09fcda5ebbeb27056dfff3a2d.tar.gz
freeipa.git-9beb467d98cb16e09fcda5ebbeb27056dfff3a2d.tar.xz
freeipa.git-9beb467d98cb16e09fcda5ebbeb27056dfff3a2d.zip
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
Diffstat (limited to 'ipaserver/plugins/ldap2.py')
-rw-r--r--ipaserver/plugins/ldap2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py
index 4bfc849d..06980345 100644
--- a/ipaserver/plugins/ldap2.py
+++ b/ipaserver/plugins/ldap2.py
@@ -210,7 +210,7 @@ def _handle_errors(e, **kw):
raise errors.DuplicateEntry()
except _ldap.CONSTRAINT_VIOLATION:
# 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)