]> granicus.if.org Git - python/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Mon, 28 Mar 2005 01:08:02 +0000 (01:08 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 28 Mar 2005 01:08:02 +0000 (01:08 +0000)
14 files changed:
Lib/UserString.py
Lib/distutils/command/upload.py
Lib/distutils/tests/test_dist.py
Lib/distutils/tests/test_versionpredicate.py
Lib/distutils/versionpredicate.py
Lib/gzip.py
Lib/subprocess.py
Lib/tarfile.py
Lib/test/regrtest.py
Lib/test/test_functional.py
Lib/test/test_mmap.py
Lib/test/test_subprocess.py
Lib/test/test_xdrlib.py
Tools/msi/msi.py

index 32511390501f92539b23764246e7ade4d22f4b18..94eb66d4542b03d02821b9c1c9606e8c58b722b3 100755 (executable)
@@ -147,12 +147,12 @@ class MutableString(UserString):
         raise TypeError, "unhashable type (it is mutable)"
     def __setitem__(self, index, sub):
         if index < 0:
-           index += len(self.data)
+            index += len(self.data)
         if index < 0 or index >= len(self.data): raise IndexError
         self.data = self.data[:index] + sub + self.data[index+1:]
     def __delitem__(self, index):
         if index < 0:
-           index += len(self.data)
+            index += len(self.data)
         if index < 0 or index >= len(self.data): raise IndexError
         self.data = self.data[:index] + self.data[index+1:]
     def __setslice__(self, start, end, sub):
index d1d5ec601a69a5ec0617fc1742a8e371f50354f4..7b08336c82feae9470f4b06e57c9ab0a7a12f884 100644 (file)
@@ -133,7 +133,7 @@ class upload(Command):
         schema, netloc, url, params, query, fragments = \
             urlparse.urlparse(self.repository)
         assert not params and not query and not fragments
-        if schema == 'http': 
+        if schema == 'http':
             http = httplib.HTTPConnection(netloc)
         elif schema == 'https':
             http = httplib.HTTPSConnection(netloc)
@@ -145,7 +145,7 @@ class upload(Command):
         try:
             http.connect()
             http.putrequest("POST", url)
-            http.putheader('Content-type', 
+            http.putheader('Content-type',
                            'multipart/form-data; boundary=%s'%boundary)
             http.putheader('Content-length', str(len(body)))
             http.putheader('Authorization', auth)
@@ -157,11 +157,10 @@ class upload(Command):
 
         r = http.getresponse()
         if r.status == 200:
-            self.announce('Server response (%s): %s' % (r.status, r.reason), 
+            self.announce('Server response (%s): %s' % (r.status, r.reason),
                           log.INFO)
         else:
-            self.announce('Upload failed (%s): %s' % (r.status, r.reason), 
+            self.announce('Upload failed (%s): %s' % (r.status, r.reason),
                           log.ERROR)
         if self.show_response:
             print '-'*75, r.read(), '-'*75
-
index 7675fbfa93f1fdd85a720697dde26cbc4a4c078b..4d2a7cdf1a167f619ae177ce9085144948d97ed0 100644 (file)
@@ -175,7 +175,7 @@ class MetadataTestCase(unittest.TestCase):
                           {"name": "package",
                            "version": "1.0",
                            "obsoletes": ["my.pkg (splat)"]})
+
     def format_metadata(self, dist):
         sio = StringIO.StringIO()
         dist.metadata.write_pkg_file(sio)
index 44cb41ee3851604ac4e47f66aa6d7fe77d4fadd0..8a60dbe8060ce7507fa00718664515c25515efa8 100644 (file)
@@ -6,4 +6,4 @@ import distutils.versionpredicate
 import doctest
 
 def test_suite():
-   return doctest.DocTestSuite(distutils.versionpredicate)
+    return doctest.DocTestSuite(distutils.versionpredicate)
index 62d89f8b001d25c2dd4bf4ce3ae2951964c5a665..ba8b6c021b20082b713c8c23ba1ce8526b191e70 100644 (file)
@@ -101,10 +101,10 @@ class VersionPredicate:
 
         versionPredicateStr = versionPredicateStr.strip()
         if not versionPredicateStr:
-           raise ValueError("empty package restriction")
+            raise ValueError("empty package restriction")
         match = re_validPackage.match(versionPredicateStr)
         if not match:
-           raise ValueError("bad package name in %r" % versionPredicateStr)
+            raise ValueError("bad package name in %r" % versionPredicateStr)
         self.name, paren = match.groups()
         paren = paren.strip()
         if paren:
@@ -114,7 +114,7 @@ class VersionPredicate:
             str = match.groups()[0]
             self.pred = [splitUp(aPred) for aPred in str.split(",")]
             if not self.pred:
-                raise ValueError("empty parenthesized list in %r" 
+                raise ValueError("empty parenthesized list in %r"
                                  % versionPredicateStr)
         else:
             self.pred = []
index 48bd522a7138031614a5f115882256e63be9f639..4ecd2115ffe7b847c785cded9b1d6340196b39d9 100644 (file)
@@ -333,8 +333,8 @@ class GzipFile:
 
     def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):
         if self.mode == WRITE:
-           # Ensure the compressor's buffer is flushed
-           self.fileobj.write(self.compress.flush(zlib_mode))
+            # Ensure the compressor's buffer is flushed
+            self.fileobj.write(self.compress.flush(zlib_mode))
         self.fileobj.flush()
 
     def fileno(self):
index e72e26055e10e0ce661450a38ebfc105c7decc0a..783f61711a77620e5aec2cef496cfdbef666d44a 100644 (file)
@@ -626,14 +626,14 @@ class Popen(object):
         process to terminate.  The optional input argument should be a
         string to be sent to the child process, or None, if no data
         should be sent to the child.
-        
+
         communicate() returns a tuple (stdout, stderr)."""
 
         # Optimization: If we are only using one pipe, or no pipe at
         # all, using select() or threads is unnecessary.
         if [self.stdin, self.stdout, self.stderr].count(None) >= 2:
-            stdout = None 
-            stderr = None 
+            stdout = None
+            stderr = None
             if self.stdin:
                 if input:
                     self.stdin.write(input)
@@ -644,7 +644,7 @@ class Popen(object):
                 stderr = self.stderr.read()
             self.wait()
             return (stdout, stderr)
-        
+
         return self._communicate(input)
 
 
index 56cce0331c8754607eab75c78ad95935633ed024..867b2420d81ffdb1b82fa42c5ac4e7974357ae43 100644 (file)
@@ -665,7 +665,7 @@ class ExFileObject(object):
         if not result:
             raise StopIteration
         return result
-        
+
 #class ExFileObject
 
 #------------------
index 20407f8bd3c23fa5b4cf9c3b3fa4be0c7dce831b..6160b3d07d505cb1b5bcc258a56ef275225f2d93 100755 (executable)
@@ -93,7 +93,7 @@ resources to test.  Currently only the following are defined:
                 in the standard library and test suite.  This takes
                 a long time.
 
-    subprocess  Run all tests for the subprocess module. 
+    subprocess  Run all tests for the subprocess module.
 
 To enable all resources except one, use '-uall,-<resource>'.  For
 example, to run all the tests except for the bsddb tests, give the
index 97e30c3f8ede2db84adca27f9ef8f44941afea24..5078a2e94f18ec0e56c05da19a7c533aa67ac883 100644 (file)
@@ -139,7 +139,7 @@ class TestPartial(unittest.TestCase):
         self.assertEqual(join(data), '0123456789')
         join = self.thetype(''.join)
         self.assertEqual(join(data), '0123456789')
-    
+
 class PartialSubclass(functional.partial):
     pass
 
index d2251736088bffd7aa3dbffb6355f14311c2474d..efb7180f5f66f84bae375f6b3a91a7faac12e816 100644 (file)
@@ -321,7 +321,7 @@ def test_both():
             f.close()
 
             f = open(TESTFN, "rb+")
-            mf = mmap.mmap(f.fileno(), 0) 
+            mf = mmap.mmap(f.fileno(), 0)
             verify(len(mf) == 2**16, "Map size should equal file size.")
             vereq(mf.read(2**16), 2**16 * "m")
             mf.close()
@@ -329,7 +329,7 @@ def test_both():
 
         finally:
             os.unlink(TESTFN)
-    
+
     # test mapping of entire file by passing 0 for map length
     if hasattr(os, "stat"):
         print "  Ensuring that passing 0 as map length sets map size to current file size."
@@ -337,17 +337,17 @@ def test_both():
         try:
             f.write(2**16 * 'm') # Arbitrary character
             f.close()
-    
+
             f = open(TESTFN, "rb+")
-            mf = mmap.mmap(f.fileno(), 0) 
+            mf = mmap.mmap(f.fileno(), 0)
             verify(len(mf) == 2**16, "Map size should equal file size.")
             vereq(mf.read(2**16), 2**16 * "m")
             mf.close()
             f.close()
-    
+
         finally:
             os.unlink(TESTFN)
-    
+
     print ' Test passed'
 
 test_both()
index e6f981dfc1dc142b951bc051c1d69092796ac26d..c351ee92b13e48c9579dd49d89b62854b47a4d9f 100644 (file)
@@ -387,7 +387,7 @@ class ProcessTestCase(unittest.TestCase):
         if test_support.is_resource_enabled("subprocess") and not mswindows:
             max_handles = 1026 # too much for most UNIX systems
         else:
-            max_handles = 65 
+            max_handles = 65
         for i in range(max_handles):
             p = subprocess.Popen([sys.executable, "-c",
                     "import sys;sys.stdout.write(sys.stdin.read())"],
index afa6afe2bbef8b471ccac91b9b48394d363a90ce..e9517c508c51ee38c1a8a7a8a9dc0b85a02f4028 100644 (file)
@@ -1,4 +1,3 @@
 import xdrlib
 
 xdrlib._test()
-
index d020082fc6305ff746a18bce716e1ac743c3a716..49985654cf7820352a7d661a312141d536a8a4bc 100644 (file)
@@ -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