Fix deprecation warning in tempfile.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 23 Feb 2013 06:16:07 +0000 (08:16 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 23 Feb 2013 06:16:07 +0000 (08:16 +0200)
Lib/tempfile.py

index 2dfc6095cb1538d0be20b0c4fe4e95d16c7e01a7..f2ddbb0d9ca1a12797cd322103ed18d5c0ead294 100644 (file)
@@ -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,