X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-lock;h=6d56ddb5d097fe509d9dcf077dae62d70b6286d2;hb=d2388a189d5c4c80c8272e511fd8c95d4dc2fbc8;hp=bfde9f8b1bf766ddfcd18bae62b223fbeecfd3cf;hpb=12870181b2d5922f9774f88cb808f509a8e94704;p=mirror%2Fuserdir-ldap.git diff --git a/ud-lock b/ud-lock index bfde9f8..6d56ddb 100755 --- a/ud-lock +++ b/ud-lock @@ -122,9 +122,9 @@ def do_one_user(lc, user, ticket): print ' %s: %s'%(key, set[key]) rec.append( (ldap.MOD_REPLACE, key, set[key]) ) - print ' %s: deleting keyFingerPrint'%(user) - rec.append( (ldap.MOD_DELETE, 'keyFingerPrint', None) ) - + if u.numkeys() > 0: + print ' %s: deleting keyFingerPrint'%(user) + rec.append( (ldap.MOD_DELETE, 'keyFingerPrint', None) ) if dry_run: print '(not committing)'