On Mon, 2011-07-25 at 10:08 -0400, Rob Crittenden wrote: > When adding an indirect map verify that the key doesn't already exist. > > There is still the chance of collision but checking first should limit > it in any case. > > https://fedorahosted.org/freeipa/ticket/1520 > > rob
This patch is OK functionally, but it can be improved. This command consists of 2 sub-commands. Checking for one sub-command's corner-case (by automountkey_show) may be OK for now, but it doesn't cover a situation when second sub-command fails for some other error. I think this is what we should to do: try: automountmap_add automountkey_add except Exception, e: Clean up - remove possibly created automountmap raise e That way we will be covered for more corner-cases + we will save one automountkey_show and speed up the command. Martin _______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel