summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/automember.py4
-rw-r--r--ipalib/plugins/baseldap.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index fc696cc6..71f9a832 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -172,8 +172,8 @@ class automember(LDAPObject):
container_dn = api.env.container_automember
- object_name = 'auto_member_rule'
- object_name_plural = 'auto_member_rules'
+ object_name = 'Automember rule'
+ object_name_plural = 'Automember rules'
object_class = ['top', 'automemberregexrule']
default_attributes = [
'automemberinclusiveregex', 'automemberexclusiveregex',
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 503696ef..eab8d74e 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -582,9 +582,10 @@ class LDAPObject(Object):
)
def handle_duplicate_entry(self, *keys):
- pkey = ''
- if self.primary_key:
+ try:
pkey = keys[-1]
+ except KeyError:
+ pkey = ''
raise errors.DuplicateEntry(
message=self.already_exists_msg % {
'pkey': pkey, 'oname': self.object_name,