From 4791a242688167ffc4abb3b9f42d6cd9e877652e Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Fri, 5 Oct 2012 03:15:39 +0200 Subject: #16135: Removal of OS/2 support (Python code partial cleanup) --- Lib/mailbox.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Lib/mailbox.py') diff --git a/Lib/mailbox.py b/Lib/mailbox.py index a9207f3043..01f35514a7 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) -- cgit v1.2.1