diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-03-24 01:38:38 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-03-24 01:38:38 (GMT) |
commit | 03f3ee6d891e86d3744793f5d66624e52c8261d5 (patch) | |
tree | 354a1c762c1bdb1e6360589891be99206d98c7ac /Lib/mailbox.py | |
parent | eff724490f002eb065da12a33a69e0e3dc22812f (diff) | |
download | cpython-03f3ee6d891e86d3744793f5d66624e52c8261d5.zip cpython-03f3ee6d891e86d3744793f5d66624e52c8261d5.tar.gz cpython-03f3ee6d891e86d3744793f5d66624e52c8261d5.tar.bz2 |
Try /var/mail before trying /usr/mail. Most new systems use /var.
This in inside the test so it really doesn't matter much. Closes
SF patch 497097.
Diffstat (limited to 'Lib/mailbox.py')
-rwxr-xr-x | Lib/mailbox.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 302e4b1..ed83489 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -276,7 +276,10 @@ def _test(): if mbox[:1] == '+': mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] elif not '/' in mbox: - mbox = '/usr/mail/' + mbox + if os.path.isfile('/var/mail/' + mbox): + mbox = '/var/mail/' + mbox + else: + mbox = '/usr/mail/' + mbox if os.path.isdir(mbox): if os.path.isdir(os.path.join(mbox, 'cur')): mb = Maildir(mbox) |