Hi,

the attached patch fixes <https://fedorahosted.org/freeipa/ticket/4066>.

Honza

--
Jan Cholasta
>From 751ba817f04ba189b2000e0d0f02611ac62243cb Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 5 Dec 2013 14:43:19 +0100
Subject: [PATCH] Fix internal error in the user-status command.

https://fedorahosted.org/freeipa/ticket/4066
---
 ipalib/plugins/user.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index c855145..ae927b6 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -922,14 +922,14 @@ class user_status(LDAPQuery):
                     other_ldap.connect(ccache=os.environ['KRB5CCNAME'])
                 except Exception, e:
                     self.error("user_status: Connecting to %s failed with %s" % (host, str(e)))
-                    newresult = ldap.make_entry(dn)
+                    newresult = {'dn': dn}
                     newresult['server'] = _("%(host)s failed: %(error)s") % dict(host=host, error=str(e))
                     entries.append(newresult)
                     count += 1
                     continue
             try:
                 entry = other_ldap.get_entry(dn, attr_list)
-                newresult = ldap.make_entry(dn)
+                newresult = {'dn': dn}
                 for attr in ['krblastsuccessfulauth', 'krblastfailedauth']:
                     newresult[attr] = entry[1].get(attr, [u'N/A'])
                 newresult['krbloginfailedcount'] = entry[1].get('krbloginfailedcount', u'0')
@@ -958,7 +958,7 @@ class user_status(LDAPQuery):
                 self.obj.handle_not_found(*keys)
             except Exception, e:
                 self.error("user_status: Retrieving status for %s failed with %s" % (dn, str(e)))
-                newresult = ldap.make_entry(dn)
+                newresult = {'dn': dn}
                 newresult['server'] = _("%(host)s failed") % dict(host=host)
                 entries.append(newresult)
                 count += 1
-- 
1.8.4.2

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to