Need a little python assistance for accounts export

TomLy lyz27 at yahoo.com
Sat Nov 18 18:46:58 UTC 2006


I am working on the db dumper/ ldap importer and I can't seem to figure
a couple of things out with the python ldif libraries.  

I am working on getting the info out to an LDIF file.  I think this is
accomplished by putting the data into a dictionary (line 200) and making
a call to LDIFWriter (line 204).  I was hoping that all I had to do was
pass the dictionary to the unparse function, but that's not working
right.

When I call the unparse function I get output like the following:

dn: dc=fedoraproject,dc=org cn=Tom Lynema
telephoneNumber: N
telephoneNumber: o
telephoneNumber: n
telephoneNumber: e

It's always one character per line for some reason.  

If anyone has insight as to how I'm supposed to do this please fill me 
in.  Since LDIF is fairly easy, I may just end up writing my own
functions to write a dictionary object to LDIF.

If there's a better place to ask, let me know.

Thanks,

~tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PgToLDAP.py
Type: text/x-python
Size: 10555 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20061118/8098c924/attachment.py 


More information about the infrastructure mailing list