]> granicus.if.org Git - python/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Fri, 9 Aug 2002 18:01:01 +0000 (18:01 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 9 Aug 2002 18:01:01 +0000 (18:01 +0000)
Lib/tempfile.py
Lib/test/test_tempfile.py

index f3cc4819ef5b6b4fce5e7baa49c7f35aa9edca03..32b83a0801ce3fcc2248672cde5d7b8fc5dfe1ae 100644 (file)
@@ -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)
index d96aae7f7e76bf5ec0d64d1bae20b258c994e629..fd7e9d080198236b3a3d57498edf85ecdd594057 100644 (file)
@@ -268,7 +268,7 @@ class test__mkstemp_inner(TC):
         def __del__(self):
             self._close(self.fd)
             self._unlink(self.name)
-            
+
     def do_create(self, dir=None, pre="", suf="", bin=1):
         if dir is None:
             dir = tempfile.gettempdir()
@@ -485,7 +485,7 @@ class test_mkdtemp(TC):
         os.rmdir(self.do_create(suf="b"))
         os.rmdir(self.do_create(pre="a", suf="b"))
         os.rmdir(self.do_create(pre="aa", suf=".txt"))
-        
+
     def test_basic_many(self):
         """mkdtemp can create many directories (stochastic)"""
         extant = range(1000)