summaryrefslogtreecommitdiff
path: root/Mailman/MailCommandHandler.py
diff options
context:
space:
mode:
authorklm1998-12-09 16:32:14 +0000
committerklm1998-12-09 16:32:14 +0000
commitc9332fd7ddde0c8561a5f3470e00116bdbf25645 (patch)
treeb58a440462bf30480da7989a8878ee2ef2c21876 /Mailman/MailCommandHandler.py
parent07fa1ebcf76dedafec075d3c03579e3b471e25b7 (diff)
downloadmailman-c9332fd7ddde0c8561a5f3470e00116bdbf25645.tar.gz
mailman-c9332fd7ddde0c8561a5f3470e00116bdbf25645.tar.zst
mailman-c9332fd7ddde0c8561a5f3470e00116bdbf25645.zip
.ProcessPasswordCmd(): Was not working because .ChangeUserPassword()
was getting called with the wrong arguments - confirmation of the old password needed to be done in a separate call to ConfirmUserPassword(). (Incidentally, i am hoping that i repaired a problem with the mechanism that pushes the cvs source - this will test it.)
Diffstat (limited to 'Mailman/MailCommandHandler.py')
-rw-r--r--Mailman/MailCommandHandler.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py
index 048bcbb53..a4a80e694 100644
--- a/Mailman/MailCommandHandler.py
+++ b/Mailman/MailCommandHandler.py
@@ -28,6 +28,7 @@ import Message
import Errors
import mm_cfg
import Utils
+import traceback
option_descs = { 'digest' :
@@ -175,8 +176,9 @@ class MailCommandHandler:
self.AddError("Usage: password <oldpw> <newpw>")
return
try:
- self.ChangeUserPassword(mail.GetSender(),
- args[0], args[1], args[1])
+ who = mail.GetSender()
+ self.ConfirmUserPassword(who, args[0])
+ self.ChangeUserPassword(mail.GetSender(), args[1], args[1])
self.AddToResponse('Succeeded.')
except Errors.MMListNotReady:
self.AddError("List is not functional.")
@@ -186,10 +188,14 @@ class MailCommandHandler:
except Errors.MMBadPasswordError:
self.AddError("You gave the wrong password.")
except:
- self.AddError("An unknown Mailman error occured.")
+ exc = sys.exc_info()
+ self.AddError("An unknown Mailman error occured."
self.AddError("Please forward on your request to %s" %
self.GetAdminEmail())
- self.AddError("%s" % sys.exc_type)
+ self.LogMsg("error",
+ "MailCommandHandler.ProcessPasswordCmd():\n%s%s, %s",
+ string.join(traceback.format_tb(exc[2])),
+ exc[0], exc[1])
def ProcessOptionsCmd(self, args, cmd, mail):
sender = self.FindUser(mail.GetSender())