From 7f8a2fb6119f92c7cf4f68bab3bfe4dacbae7117 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 22 Oct 2007 12:42:46 +0000 Subject: Fix exception indexing. --- Lib/tempfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/tempfile.py') diff --git a/Lib/tempfile.py b/Lib/tempfile.py index ae2b77ff43..3b21ff2935 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, -- cgit v1.2.1