X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=fdc3cfd28a145ec2b19eedbcb79c2e3015eb1702;hb=6bfb2e39cd7bc15ff6a7a7d6f8afec5ad7c8dbc1;hp=8d799591b427fafbf29645d17b1aca6ab7876c77;hpb=f2d431dee2f52f071afa1fd00d4e4589b1f5899e;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 8d79959..fdc3cfd 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -624,8 +624,7 @@ def HandleChange(Reply,DnRecord,Key): CommitChanges = 0 Result = Result + "FinishConfirmSudopassword raised an error (%s) - no changes committed\n"%(e); - # Modify the record - if CommitChanges == 1: + if CommitChanges == 1 and len(Attrs) > 0: Dn = "uid=" + GetAttr(DnRecord,"uid") + "," + BaseDn; l.modify_s(Dn,Attrs);