[New-bugs-announce] [issue1310] tempfile breaks on Windows

Christian Heimes report at bugs.python.org
Mon Oct 22 04:23:03 CEST 2007


New submission from Christian Heimes:

tempfile breaks on Windows because exception objectss no longer support
e[0]. The fix is simple and short:

Index: Lib/tempfile.py
===================================================================
--- Lib/tempfile.py     (Revision 58587)
+++ Lib/tempfile.py     (Arbeitskopie)
@@ -201,7 +201,7 @@
                 del fp, fd
                 return dir
             except (OSError, IOError) as e:
-                if e[0] != _errno.EEXIST:
+                if e.args[0] != _errno.EEXIST:
                     break # no point trying more names in this directory
                 pass

----------
components: Library (Lib)
messages: 56638
nosy: tiran
severity: normal
status: open
title: tempfile breaks on Windows
type: behavior
versions: Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1310>
__________________________________


More information about the New-bugs-announce mailing list