[Python-checkins] cpython (merge 3.2 -> default): Merge #11306 fix.
r.david.murray
python-checkins at python.org
Wed Mar 2 16:20:51 CET 2011
http://hg.python.org/cpython/rev/6c5ded8be23f
changeset: 68074:6c5ded8be23f
parent: 68071:f3613bbf262b
parent: 68073:75541fc89b11
user: R David Murray <rdmurray at bitdance.com>
date: Tue Mar 01 22:32:57 2011 -0500
summary:
Merge #11306 fix.
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list