]> granicus.if.org Git - python/commitdiff
Fix exception indexing.
authorGeorg Brandl <georg@python.org>
Mon, 22 Oct 2007 12:42:46 +0000 (12:42 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 22 Oct 2007 12:42:46 +0000 (12:42 +0000)
Lib/tempfile.py

index ae2b77ff4316d6d17ea9553cee6b3ed6f3e2ec4a..3b21ff29353a840badb288f07ca1afd5ad5f4a35 100644 (file)
@@ -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,