[Freeipa-devel] [PATCH] 213 use the csv module for ldapupdate

Rob Crittenden rcritten at redhat.com
Wed May 13 21:08:25 UTC 2009


In ldapupdate I wanted to make things easy on update writers and them 
pass in a comma-separated string to make a multi-valued attribute, like:

add:objectclass: top, person, inetorgperson

This is my last attempt at working around this "feature" before simply 
dropping it. It has turned out to be almost more trouble than it is worth.

In any case, this patch drops my hackish lex-based parser for the python 
csv module. This works a bit nicer anyway. You do have to be a bit 
careful about mixing ' and " though.

What I've done is set the quote string to whatever the first character 
of a line is, defaulting to ". In other words, if you want the quote 
character to be ', then pass it as the first character in the update line.

Something like:

add:name:'"Here is a quoted value, and another", "and one more"'

This breaks down to 2 values to be added:

"Here is a quoted value, and another"
"and one more"

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-213-csv.patch
Type: application/mbox
Size: 4317 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090513/927f4d84/attachment.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090513/927f4d84/attachment.bin>


More information about the Freeipa-devel mailing list