summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/tempfile.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2
Raise statement normalization in Lib/.
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