From: Ezio Melotti Date: Sat, 23 Feb 2013 06:16:07 +0000 (+0200) Subject: Fix deprecation warning in tempfile. X-Git-Tag: v2.7.4rc1~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dbcec9dd15f085be99c68fbe4fec685a27278f0;p=thirdparty%2FPython%2Fcpython.git Fix deprecation warning in tempfile. --- diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 2dfc6095cb15..f2ddbb0d9ca1 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -205,7 +205,7 @@ def _get_default_tempdir(): _os.unlink(filename) 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,