diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-03-23 19:07:46 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-03-23 19:07:46 (GMT) |
commit | a6c0c202f55e25f03d9427cab229a196f92715a6 (patch) | |
tree | d0fa1bb459a1f43e8c7dcb2fc47be682c250253d | |
parent | e5fc7748356a551fa32e640ed6d7dc85ef08e1cd (diff) | |
download | cpython-a6c0c202f55e25f03d9427cab229a196f92715a6.zip cpython-a6c0c202f55e25f03d9427cab229a196f92715a6.tar.gz cpython-a6c0c202f55e25f03d9427cab229a196f92715a6.tar.bz2 |
Mechanical whitespace normalization.
-rw-r--r-- | Lib/bsddb/__init__.py | 2 | ||||
-rw-r--r-- | Lib/codecs.py | 4 | ||||
-rw-r--r-- | Lib/distutils/dir_util.py | 2 | ||||
-rw-r--r-- | Lib/locale.py | 2 | ||||
-rw-r--r-- | Lib/test/test_minidom.py | 6 | ||||
-rw-r--r-- | Lib/test/test_mmap.py | 2 | ||||
-rw-r--r-- | Lib/test/test_poll.py | 2 | ||||
-rw-r--r-- | Lib/urllib2.py | 4 | ||||
-rw-r--r-- | Mac/OSX/Doc/setup.py | 2 | ||||
-rw-r--r-- | Mac/OSX/fixapplepython23.py | 13 | ||||
-rw-r--r-- | Tools/msi/msi.py | 2 | ||||
-rw-r--r-- | setup.py | 2 |
12 files changed, 21 insertions, 22 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index be8e577..fb3c4cd 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -195,7 +195,7 @@ class _DBWithCursor(_iter_mixin): try: self.saved_dbc_key = c.current(0,0,0)[0] except db.DBError: - pass + pass c.close() del c for cref in self._cursor_refs.values(): diff --git a/Lib/codecs.py b/Lib/codecs.py index 9a217b3..5e2b984 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -269,7 +269,7 @@ class StreamReader(Codec): if self.linebuffer: self.charbuffer = "".join(self.linebuffer) self.linebuffer = None - + # read until we get the required number of characters (if available) while True: # can the request can be satisfied from the character buffer? @@ -338,7 +338,7 @@ class StreamReader(Codec): if not keepends: line = line.splitlines(False)[0] return line - + readsize = size or 72 line = "" # If size is given, we call read() only once diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 2248b60..43994db 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if not isinstance(name, StringTypes): + if not isinstance(name, StringTypes): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) diff --git a/Lib/locale.py b/Lib/locale.py index ac8f3be..377cdc1 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -663,7 +663,7 @@ locale_alias = { # # This maps Windows language identifiers to locale strings. # -# This list has been updated from +# This list has been updated from # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp # to include every locale up to Windows XP. # diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 68aac0f..a6d309f 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -1135,9 +1135,9 @@ def testPatch1094164 (): # Check that replacing a child with itself leaves the tree unchanged elem.replaceChild(e, e) confirm(e.parentNode is elem, "After replaceChild()") - - - + + + def testReplaceWholeText(): def setup(): doc = parseString("<doc>a<e/>d</doc>") diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 91cfe83..88e5476 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -126,7 +126,7 @@ def test_both(): f.seek(0, 2) verify(f.tell() == 512, 'Underlying file not truncated') f.close() - verify(m.size() == 512, 'New size not reflected in file') + verify(m.size() == 512, 'New size not reflected in file') m.close() diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py index f99c37f..3a48bce 100644 --- a/Lib/test/test_poll.py +++ b/Lib/test/test_poll.py @@ -185,7 +185,7 @@ def test_poll3(): if x != 5: print 'Overflow must have occurred' print 'Poll test 3 complete' - + test_poll1() test_poll2() diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 85cc4e1..33babe4 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1064,7 +1064,7 @@ def parse_keqv_list(l): def parse_http_list(s): """Parse lists as described by RFC 2068 Section 2. - + In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the @@ -1096,7 +1096,7 @@ def parse_http_list(s): if cur == '"': quote = True - + part += cur # append last part diff --git a/Mac/OSX/Doc/setup.py b/Mac/OSX/Doc/setup.py index ee17226..bd86a20 100644 --- a/Mac/OSX/Doc/setup.py +++ b/Mac/OSX/Doc/setup.py @@ -57,7 +57,7 @@ class DocBuild(build): (self.doc_version,self.doc_version) tarfile = 'html-%s.tar.bz2' % self.doc_version dirname = 'Python-Docs-%s' % self.doc_version - + if os.path.exists(self.build_html): raise RuntimeError, '%s: already exists, please remove and try again' % self.build_html os.chdir(self.build_base) diff --git a/Mac/OSX/fixapplepython23.py b/Mac/OSX/fixapplepython23.py index ce54890..181181e 100644 --- a/Mac/OSX/fixapplepython23.py +++ b/Mac/OSX/fixapplepython23.py @@ -43,12 +43,12 @@ def findline(lines, start): if lines[i][:len(start)] == start: return i return -1 - + def fix(makefile, do_apply): """Fix the Makefile, if required.""" fixed = False lines = open(makefile).readlines() - + for old, new in CHANGES: i = findline(lines, new) if i >= 0: @@ -61,7 +61,7 @@ def fix(makefile, do_apply): return 2 lines[i] = new fixed = True - + if fixed: if do_apply: print 'fixapplepython23: Fix to Apple-installed Python 2.3 applied' @@ -74,7 +74,7 @@ def fix(makefile, do_apply): else: print 'fixapplepython23: No fix needed, appears to have been applied before' return 0 - + def makescript(filename, compiler): """Create a wrapper script for a compiler""" dirname = os.path.split(filename)[0] @@ -85,7 +85,7 @@ def makescript(filename, compiler): fp.close() os.chmod(filename, 0755) print 'fixapplepython23: Created', filename - + def main(): # Check for -n option if len(sys.argv) > 1 and sys.argv[1] == '-n': @@ -113,7 +113,6 @@ def main(): # Finally fix the makefile rv = fix(MAKEFILE, do_apply) sys.exit(rv) - + if __name__ == '__main__': main() - diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index f51622c..b639520 100644 --- a/Tools/msi/msi.py +++ b/Tools/msi/msi.py @@ -134,7 +134,7 @@ pythondll_uuid = { "24":"{9B81E618-2301-4035-AC77-75D9ABEB7301}", "25":"{2e41b118-38bd-4c1b-a840-6977efd1b911}" } [major+minor] - + # Build the mingw import library, libpythonXY.a # This requires 'nm' and 'dlltool' executables on your PATH @@ -159,7 +159,7 @@ class PyBuildExt(build_ext): line = line.split() remove_modules.append(line[0]) input.close() - + for ext in self.extensions[:]: if ext.name in remove_modules: self.extensions.remove(ext) |