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

Jason Gerard DeRose jderose at redhat.com
Mon May 18 20:48:03 UTC 2009


On Wed, 2009-05-13 at 17:08 -0400, Rob Crittenden wrote:
> 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

ack.




More information about the Freeipa-devel mailing list