[Python-checkins] r50789 - in python/trunk/Lib: mailbox.py test/test_mailbox.py
Neal Norwitz
nnorwitz at gmail.com
Sun Jul 23 20:10:45 CEST 2006
On 7/23/06, andrew.macintyre <python-checkins at python.org> wrote:
> Modified: python/trunk/Lib/mailbox.py
> ==============================================================================
> --- python/trunk/Lib/mailbox.py (original)
> +++ python/trunk/Lib/mailbox.py Sun Jul 23 15:04:00 2006
> @@ -15,6 +15,9 @@
> import rfc822
> import StringIO
> try:
> + if sys.platform == 'os2emx':
> + # OS/2 EMX fcntl() not adequate
> + raise ImportError
> import fcntl
> except ImportError:
> fcntl = None
Is there no part of the test that can work on os2emx?
...
> @@ -1030,6 +1034,9 @@
> if hasattr(os, 'link'):
> os.link(os.path.join(self._path, str(key)),
> os.path.join(self._path, str(prev + 1)))
> + if sys.platform == 'os2emx':
> + # cannot unlink an open file on OS/2
> + f.close()
> os.unlink(os.path.join(self._path, str(key)))
> else:
> f.close()
This doesn't seem necessary if we skip the entire test on os2emx.
Seems like one or the other should be removed.
n
More information about the Python-checkins
mailing list