X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-mailgate;h=fdc3cfd28a145ec2b19eedbcb79c2e3015eb1702;hp=8d799591b427fafbf29645d17b1aca6ab7876c77;hb=c7637cf2e45f2e0223e27a0eee30767172aada48;hpb=045fb5eac78e495e2f6d6797401718d55b58ff8d 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);