summaryrefslogtreecommitdiffstats
path: root/Lib/mailbox.py
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-24 01:38:38 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-24 01:38:38 (GMT)
commit03f3ee6d891e86d3744793f5d66624e52c8261d5 (patch)
tree354a1c762c1bdb1e6360589891be99206d98c7ac /Lib/mailbox.py
parenteff724490f002eb065da12a33a69e0e3dc22812f (diff)
downloadcpython-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-xLib/mailbox.py5
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)