Commit 4dbcec9d authored by Ezio Melotti's avatar Ezio Melotti

Fix deprecation warning in tempfile.

parent ef1db54a
...@@ -205,7 +205,7 @@ def _get_default_tempdir(): ...@@ -205,7 +205,7 @@ def _get_default_tempdir():
_os.unlink(filename) _os.unlink(filename)
return dir return dir
except (OSError, IOError) as e: 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 break # no point trying more names in this directory
pass pass
raise IOError, (_errno.ENOENT, 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