lib/import: do not produce add commands with an empty list of values

This commit is contained in:
Benjamin Dauvergne 2016-03-18 12:05:58 +01:00
parent 5b0150f6ad
commit 876ff164e7
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ for ldif_path in args.ldifs:
modlist.append((ldap.MOD_ADD, key, list(new-old)))
else:
modlist.append((ldap.MOD_REPLACE, key, list(new)))
else:
elif new:
modlist.append((ldap.MOD_ADD, key, list(new)))
if modlist:
modifies.append((dn, modlist))