Message95486
| Author |
doko |
| Recipients |
doko |
| Date |
2009年11月19日.16:15:23 |
| SpamBayes Score |
2.220446e-16 |
| Marked as misclassified |
No |
| Message-id |
<1258647326.68.0.261951425057.issue7359@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
no change in behaviour in 2.6
the mailbox module in python 2.5 cannot modify mboxes in read-only
directories, e.g. the system mail spool. This is because
mailbox._singlefileMailbox.flush() tries to write the modified mailbox
to a temporary file and then rename it. See:
penelope[tmp]$ python2.5
Python 2.5 (release25-maint, Dec 9 2006, 14:35:53)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mailbox
>>> mbox = mailbox.mbox("/var/mail/nikolaus")
>>> mbox.clear()
>>> mbox.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/mailbox.py", line 623, in close
self.flush()
File "/usr/lib/python2.5/mailbox.py", line 570, in flush
new_file = _create_temporary(self._path)
File "/usr/lib/python2.5/mailbox.py", line 1885, in _create_temporary
os.getpid()))
File "/usr/lib/python2.5/mailbox.py", line 1875, in _create_carefully
fd = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR)
OSError: [Errno 13] Permission denied:
'/tmp/mail/nikolaus.1195061622.penelope.4241'
>>> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年11月19日 16:15:26 | doko | set | recipients:
+ doko |
| 2009年11月19日 16:15:26 | doko | set | messageid: <1258647326.68.0.261951425057.issue7359@psf.upfronthosting.co.za> |
| 2009年11月19日 16:15:24 | doko | link | issue7359 messages |
| 2009年11月19日 16:15:23 | doko | create |
|