Hi,

the attached patch fixes a bug I have discovered while reviewing the vault patches.


Pushed to master under the one-liner rule: dc668b1b6a75472ea79a6af4dbcd8c6a2c5a0384

Honza

--
Jan Cholasta
>From ac96930015e735588e3830ed88948ddcc0b48633 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Fri, 15 May 2015 14:00:54 +0000
Subject: [PATCH] baseldap: Fix possible crash in
 LDAPObject.handle_duplicate_entry

---
 ipalib/plugins/baseldap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index b06b570..2eab69f 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -756,7 +756,7 @@ class LDAPObject(Object):
     def handle_duplicate_entry(self, *keys):
         try:
             pkey = keys[-1]
-        except KeyError:
+        except IndexError:
             pkey = ''
         raise errors.DuplicateEntry(
             message=self.already_exists_msg % {
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to