Commit 7f8a2fb6 authored by Georg Brandl's avatar Georg Brandl

Fix exception indexing.

parent c61b62d6
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment