[Python-checkins] cpython (merge default -> default): merge heads (original) (raw)
r.david.murray python-checkins at python.org
Wed Mar 2 16:20:51 CET 2011
- Previous message: [Python-checkins] cpython (2.7): #11306: Treat EROFS like EACCES when making a 'file is read-only' decision
- Next message: [Python-checkins] devinabox: Use shutil.rmtree() over os.rmdir() in case the tests get messy.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://hg.python.org/cpython/rev/6910af7df354 changeset: 68078:6910af7df354 parent: 68072:b452a74f8f1a parent: 68076:3700b4b85e54 user: R David Murray <rdmurray at bitdance.com> date: Wed Mar 02 10:20:16 2011 -0500 summary: merge heads
files:
diff --git a/Lib/mailbox.py b/Lib/mailbox.py --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -578,7 +578,7 @@ f = open(self._path, 'wb+') else: raise NoSuchMailboxError(self._path) - elif e.errno == errno.EACCES: + elif e.errno in (errno.EACCES, errno.EROFS): f = open(self._path, 'rb') else: raise @@ -2012,7 +2012,7 @@ pre_lock = _create_temporary(f.name + '.lock') pre_lock.close() except IOError as e: - if e.errno == errno.EACCES: + if e.errno in (errno.EACCES, errno.EROFS): return # Without write access, just skip dotlocking. else: raise diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -35,6 +35,10 @@ Library
+- Issue #11306: mailbox in certain cases adapts to an inability to open
- certain files in read-write mode. Previously it detected this by
- checking for EACCES, now it also checks for EROFS.
- Issue #10924: Adding salt and Modular Crypt Format to crypt library. Moved old C wrapper to _crypt, and added a Python wrapper with enhanced salt generation and simpler API for password generation.
-- Repository URL: http://hg.python.org/cpython
- Previous message: [Python-checkins] cpython (2.7): #11306: Treat EROFS like EACCES when making a 'file is read-only' decision
- Next message: [Python-checkins] devinabox: Use shutil.rmtree() over os.rmdir() in case the tests get messy.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]