summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index b6b3b96..ae2b77f 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -204,8 +204,8 @@ def _get_default_tempdir():
if e[0] != _errno.EEXIST:
break # no point trying more names in this directory
pass
- raise IOError, (_errno.ENOENT,
- ("No usable temporary directory found in %s" % dirlist))
+ raise IOError(_errno.ENOENT,
+ "No usable temporary directory found in %s" % dirlist)
_name_sequence = None
@@ -240,7 +240,7 @@ def _mkstemp_inner(dir, pre, suf, flags):
continue # try again
raise
- raise IOError, (_errno.EEXIST, "No usable temporary file name found")
+ raise IOError(_errno.EEXIST, "No usable temporary file name found")
# User visible interfaces.
@@ -331,7 +331,7 @@ def mkdtemp(suffix="", prefix=template, dir=None):
continue # try again
raise
- raise IOError, (_errno.EEXIST, "No usable temporary directory name found")
+ raise IOError(_errno.EEXIST, "No usable temporary directory name found")
def mktemp(suffix="", prefix=template, dir=None):
"""mktemp([suffix, [prefix, [dir]]])
@@ -361,7 +361,7 @@ def mktemp(suffix="", prefix=template, dir=None):
if not _exists(file):
return file
- raise IOError, (_errno.EEXIST, "No usable temporary filename found")
+ raise IOError(_errno.EEXIST, "No usable temporary filename found")
class _TemporaryFileWrapper:
"""Temporary file wrapper