diff options
| author | bwarsaw | 1998-07-31 20:12:10 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-07-31 20:12:10 +0000 |
| commit | 4ebe7ba208ba42511ae77ce7e6d2dcb9be87137e (patch) | |
| tree | bb94e335e3714afd70c5ad7a530349d83628fb48 /Mailman/pythonlib/smtplib.py | |
| parent | 7aa4450d79231f4a8c14a00de7bb3511e7ff70f6 (diff) | |
| download | mailman-4ebe7ba208ba42511ae77ce7e6d2dcb9be87137e.tar.gz mailman-4ebe7ba208ba42511ae77ce7e6d2dcb9be87137e.tar.zst mailman-4ebe7ba208ba42511ae77ce7e6d2dcb9be87137e.zip | |
Very substantially rewritten. The old driver script let too many
uncaught exceptions through to the top level.
Uncommented out the open() definition. I think this is very helpful
during the beta debugging phase. We'll comment this out for 1.0
release (it also won't be necessary in Python 1.5.2, but nobody has
that yet!)
Exception printing has been changed so that the MultiLogger is no
longer necessary. Removes one more potential crash, but also
rationalizes print_exception() and print_environment(). There's
always exactly two places information goes:
1. To a plain text log file. This could be sys.__stderr__ if no
explicit log file is given -- e.g. the Web server's log file.
2. To an HTML sink. This will always be sys.stdout (since we use
the `print' statement), and will generally always be connected
to the input of the Web browser.
Log file printing happens first, just in case (it's better that the
server knows what's happening), but we always try to print both.
`Main' has been rewritten also. We now do not catch any problems with
import sys. If sys can't be imported, then the Python installation is
royally screwed -- even `print' won't work! Better to just let the
catastrophy percolate up to the Web browser. Even so this should
almost never happen.
Poke __stderr__ and __stdout__ into the sys module if they aren't
already there. GvR says this is a 1.5.1 feature, but we can make it
work well enough for older versions of Python, and it's convenient.
Give one final shot at printing the traceback and environment if the
exception percolates all the way up out of run_main(). This time,
just print them to stderr (usually meaning the Web server's error
log). Should this fail too, do whatever we can not to generate an
end-user visible server error.
Diffstat (limited to 'Mailman/pythonlib/smtplib.py')
0 files changed, 0 insertions, 0 deletions
