This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: tempfile breaks on Windows
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, georg.brandl
Priority: normal Keywords: patch

Created on 2007-10-22 02:23 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg56638 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-10-22 02:23
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
msg56646 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-10-22 12:42
Fixed in r58590.
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45651
2007-10-22 12:42:56georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg56646
nosy: + georg.brandl
2007-10-22 06:05:35loewissetkeywords: + patch
2007-10-22 02:23:03christian.heimescreate