Raise more specific error when an Objectclass Violation occurs Fix the virtual plugin to work with the new backend

This commit is contained in:
Rob Crittenden
2009-09-10 16:10:30 -04:00
parent 2c3bca7e74
commit eca7cdc94a
3 changed files with 20 additions and 3 deletions

View File

@@ -99,6 +99,8 @@ def _handle_errors(e, **kw):
# it indicates the previous attribute was removed by another
# update, making the oldentry stale.
raise errors.MidairCollision()
except _ldap.OBJECT_CLASS_VIOLATION:
raise errors.ObjectclassViolation(info=info)
except _ldap.ADMINLIMIT_EXCEEDED, e:
raise errors.LimitsExceeded()
except _ldap.SIZELIMIT_EXCEEDED, e: