summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-08-09 18:01:01 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-08-09 18:01:01 (GMT)
commita0d55de8773559568e57cf01445eb6a9011ad5dd (patch)
tree0c25b1c852caf0271bf21cfc6fe56312cae961af /Lib/tempfile.py
parent4030714a93afacdcb4783f37320c48b4ad99da87 (diff)
downloadcpython-a0d55de8773559568e57cf01445eb6a9011ad5dd.zip
cpython-a0d55de8773559568e57cf01445eb6a9011ad5dd.tar.gz
cpython-a0d55de8773559568e57cf01445eb6a9011ad5dd.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index f3cc481..32b83a0 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -58,11 +58,14 @@ except (ImportError, AttributeError):
release = acquire
_text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
-if hasattr(_os, 'O_NOINHERIT'): _text_openflags |= _os.O_NOINHERIT
-if hasattr(_os, 'O_NOFOLLOW'): _text_openflags |= _os.O_NOFOLLOW
+if hasattr(_os, 'O_NOINHERIT'):
+ _text_openflags |= _os.O_NOINHERIT
+if hasattr(_os, 'O_NOFOLLOW'):
+ _text_openflags |= _os.O_NOFOLLOW
_bin_openflags = _text_openflags
-if hasattr(_os, 'O_BINARY'): _bin_openflags |= _os.O_BINARY
+if hasattr(_os, 'O_BINARY'):
+ _bin_openflags |= _os.O_BINARY
if hasattr(_os, 'TMP_MAX'):
TMP_MAX = _os.TMP_MAX
@@ -177,7 +180,7 @@ def _candidate_tempdir_list():
dirlist.append(_os.curdir)
return dirlist
-
+
def _get_default_tempdir():
"""Calculate the default directory to use for temporary files.
This routine should be called through '_once' (see above) as we
@@ -239,7 +242,7 @@ def _mkstemp_inner(dir, pre, suf, flags):
raise
raise IOError, (_errno.EEXIST, "No usable temporary file name found")
-
+
# User visible interfaces.
@@ -302,7 +305,7 @@ def mkdtemp(suffix="", prefix=template, dir=gettempdir()):
"""
names = _get_candidate_names()
-
+
for seq in xrange(TMP_MAX):
name = names.next()
file = _os.path.join(dir, prefix + name + suffix)