- raise Error, "This account is locked";
- try:
- Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs)
- Result = Result + Res + "\n";
- except Error, e:
- CommitChanges = 0
- Result = Result + "FinishConfirmSudopassword raised an error (%s) - no changes committed\n"%(e);
+ raise UDNotAllowedError, "This account is locked";
+
+ if CommitChanges == 1: # only if we are still good to go
+ try:
+ Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs)
+ Result = Result + Res + "\n";
+ except Error, e:
+ CommitChanges = 0
+ Result = Result + "FinishConfirmSudopassword raised an error (%s) - no changes committed\n"%(e);
+