[Freeipa-devel] [PATCH] add ethers.byname and ethers.byaddr NIS maps

Petr Viktorin pviktori at redhat.com
Tue Apr 24 11:16:55 UTC 2012


On 04/24/2012 01:02 PM, Jan Cholasta wrote:

> The error is:
>
> Traceback (most recent call last):
> File "/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py",
> line 652, in __update_record
> self.conn.addEntry(entry)
> File "/usr/lib/python2.7/site-packages/ipaserver/ipaldap.py", line 495,
> in addEntry
> arg_desc = 'entry=%s' % (entry)
> TypeError: 'NoneType' object is not callable
>
> I'm not sure what is causing it. You might be triggering some bug in
> LDAP updater code (Rob, can you take a look at this please?)
>
>

For "convenience", the old Entry class returns None for missing 
attributes. This unfortunately applies to __str__ as well, so you can't 
convert Entries to strings. Surprisingly, exactly that is done in 
ipaldap itself.

https://fedorahosted.org/freeipa/ticket/1880 (description of problem)
https://fedorahosted.org/freeipa/ticket/2660 (currently open ticket)

A quick fix could be to change `'entry=%s' % (entry)` to `'entry=%s' % 
entry.toDict()`.

-- 
Petr³




More information about the Freeipa-devel mailing list