summaryrefslogtreecommitdiffstats
path: root/Lib/mailbox.py
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-10-05 01:15:39 (GMT)
committerJesus Cea <jcea@jcea.es>2012-10-05 01:15:39 (GMT)
commit4791a242688167ffc4abb3b9f42d6cd9e877652e (patch)
tree62a566c811ae808f9dd7a7aa10e655d4d3aad56b /Lib/mailbox.py
parentf1af7057208da7b3d15703645688fea971a4fb5e (diff)
downloadcpython-4791a242688167ffc4abb3b9f42d6cd9e877652e.zip
cpython-4791a242688167ffc4abb3b9f42d6cd9e877652e.tar.gz
cpython-4791a242688167ffc4abb3b9f42d6cd9e877652e.tar.bz2
#16135: Removal of OS/2 support (Python code partial cleanup)
Diffstat (limited to 'Lib/mailbox.py')
-rw-r--r--Lib/mailbox.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index a9207f3..01f3551 100644
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -707,8 +707,7 @@ class _singlefileMailbox(Mailbox):
try:
os.rename(new_file.name, self._path)
except OSError as e:
- if e.errno == errno.EEXIST or \
- (os.name == 'os2' and e.errno == errno.EACCES):
+ if e.errno == errno.EEXIST:
os.remove(self._path)
os.rename(new_file.name, self._path)
else:
@@ -2093,8 +2092,7 @@ def _lock_file(f, dotlock=True):
os.rename(pre_lock.name, f.name + '.lock')
dotlock_done = True
except OSError as e:
- if e.errno == errno.EEXIST or \
- (os.name == 'os2' and e.errno == errno.EACCES):
+ if e.errno == errno.EEXIST:
os.remove(pre_lock.name)
raise ExternalClashError('dot lock unavailable: %s' %
f.name)