diff options
| author | bwarsaw | 1998-12-23 00:05:52 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-12-23 00:05:52 +0000 |
| commit | fc57ff2b512050bde32ef88e39e189d66d456a47 (patch) | |
| tree | 30ae6663d9bfa544551560b3125210af2805771e | |
| parent | 11d77c50aa96352dd7d1708709b71365f1c02195 (diff) | |
| download | mailman-fc57ff2b512050bde32ef88e39e189d66d456a47.tar.gz mailman-fc57ff2b512050bde32ef88e39e189d66d456a47.tar.zst mailman-fc57ff2b512050bde32ef88e39e189d66d456a47.zip | |
At the end of main(), catch MMCantDigestError which can occur if the
list admin has disabled digests, but the user selects to turn it on.
A better solution would be to not present this option to the user in
that case.
At least now, we give a more meaningful message instead of letting the
exception percolate!
| -rw-r--r-- | Mailman/Cgi/handle_opts.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Cgi/handle_opts.py b/Mailman/Cgi/handle_opts.py index 1328785d9..f85694e9d 100644 --- a/Mailman/Cgi/handle_opts.py +++ b/Mailman/Cgi/handle_opts.py @@ -262,12 +262,17 @@ exactly what happened to provoke this error.<p>''' list.SetUserOption(user, mm_cfg.DontReceiveOwnPosts, dont_receive) list.SetUserOption(user, mm_cfg.AcknowlegePosts, ack_posts) list.SetUserOption(user, mm_cfg.DisableMime, mime) + msg = 'You have successfully set your options.' try: list.SetUserDigest(user, digest_value) except (Errors.MMAlreadyDigested, Errors.MMAlreadyUndigested): pass + except Errors.MMCantDigestError: + msg = 'The list administrator has disabled digest delivery for ' \ + 'this list, however your other options have been ' \ + 'successfully set.' list.SetUserOption(user, mm_cfg.ConcealSubscription, conceal) - PrintResults("You have successfully set your options.") + PrintResults(msg) list.Unlock() |
