From: Peter Palfrader Date: Sat, 10 Mar 2012 18:04:15 +0000 (+0100) Subject: Do not try to do an ldap modify with no changes - now show command to changes@ should... X-Git-Tag: userdir-ldap-0.3.85~65^2~20 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=c7637cf2e45f2e0223e27a0eee30767172aada48 Do not try to do an ldap modify with no changes - now show command to changes@ should work again --- 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);