From: Georg Brandl Date: Mon, 22 Oct 2007 12:42:46 +0000 (+0000) Subject: Fix exception indexing. X-Git-Tag: v3.0a2~297 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7816e5142732cca24dafc2863edbd818aada7dba;p=thirdparty%2FPython%2Fcpython.git Fix exception indexing. --- diff --git a/Lib/tempfile.py b/Lib/tempfile.py index ae2b77ff4316..3b21ff29353a 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -201,7 +201,7 @@ def _get_default_tempdir(): 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 raise IOError(_errno.ENOENT,