]> granicus.if.org Git - python/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Tue, 18 Sep 2001 02:26:39 +0000 (02:26 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 18 Sep 2001 02:26:39 +0000 (02:26 +0000)
Lib/HTMLParser.py
Lib/hmac.py
Lib/posixpath.py
Lib/smtplib.py
Lib/test/test_doctest.py
Lib/test/test_getargs.py
Lib/threading.py
Lib/zipfile.py

index df8383ecb17312e14a4344d44e9800aa88db56d9..f54e3d6196b0259e4ade6179e52c48948fdfbb41 100644 (file)
@@ -439,7 +439,7 @@ class HTMLParser:
             if c == '>':
                 # all done
                 return j + 1
-                
+
     def parse_doctype_notation(self, i, declstartpos):
         name, j = self.scan_name(i, declstartpos)
         if j < 0:
index 1315903aa98c8aca3dce9d66749f28f014e32f4c..85b1d1dcd5177ddcc4e6527c1c97bd222dd7a02e 100644 (file)
@@ -9,12 +9,12 @@ def _strxor(s1, s2):
     """Utility method. XOR the two strings s1 and s2 (must have same length).
     """
     return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
-        
+
 class HMAC:
     """RFC2104 HMAC class.
 
     This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
-    """ 
+    """
 
     def __init__(self, key, msg = None, digestmod = None):
         """Create a new HMAC object.
@@ -80,7 +80,7 @@ def new(key, msg = None, digestmod = None):
 
     key: The starting key for the hash.
     msg: if available, will immediately be hashed into the object's starting
-    state.  
+    state.
 
     You can now feed arbitrary strings into the object using its update()
     method, and can ask for the hash value at any time by calling its digest()
index 0f6b6a76dbc1cb4184fac1ef3215f9e484007e83..c587b68b89ea83fef1d1b069ed74dbcc5431a1cb 100644 (file)
@@ -398,5 +398,5 @@ symbolic links encountered in the path."""
             resolved = normpath(join(dir, resolved))
             newpath = join(*([resolved] + bits[i:]))
             return realpath(newpath)
-        
+
     return filename
index 30f93980dbfaf62e47d8d3a45b76bb25ed66525e..4527a846b94fcd6da956393499e0d1f6763055c6 100755 (executable)
@@ -126,7 +126,7 @@ class SMTPAuthenticationError(SMTPResponseException):
 
 class SSLFakeSocket:
     """A fake socket object that really wraps a SSLObject.
-    
+
     It only supports what is needed in smtplib.
     """
     def __init__(self, realsock, sslobj):
@@ -142,7 +142,7 @@ class SSLFakeSocket:
 
 class SSLFakeFile:
     """A fake file like object that really wraps a SSLObject.
-    
+
     It only supports what is needed in smtplib.
     """
     def __init__( self, sslobj):
@@ -524,7 +524,7 @@ class SMTP:
                 authmethod = method
                 break
         if self.debuglevel > 0: print "AuthMethod:", authmethod
-         
+
         if authmethod == AUTH_CRAM_MD5:
             (code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
             if code == 503:
@@ -532,7 +532,7 @@ class SMTP:
                 return (code, resp)
             (code, resp) = self.docmd(encode_cram_md5(resp, user, password))
         elif authmethod == AUTH_PLAIN:
-            (code, resp) = self.docmd("AUTH", 
+            (code, resp) = self.docmd("AUTH",
                 AUTH_PLAIN + " " + encode_plain(user, password))
         elif authmethod == None:
             raise SMTPError("No suitable authentication method found.")
@@ -544,20 +544,20 @@ class SMTP:
 
     def starttls(self, keyfile = None, certfile = None):
         """Puts the connection to the SMTP server into TLS mode.
-        
+
         If the server supports TLS, this will encrypt the rest of the SMTP
         session. If you provide the keyfile and certfile parameters,
         the identity of the SMTP server and client can be checked. This,
         however, depends on whether the socket module really checks the
         certificates.
         """
-        (resp, reply) = self.docmd("STARTTLS") 
+        (resp, reply) = self.docmd("STARTTLS")
         if resp == 220:
             sslobj = socket.ssl(self.sock, keyfile, certfile)
             self.sock = SSLFakeSocket(self.sock, sslobj)
             self.file = SSLFakeFile(sslobj)
         return (resp, reply)
-    
+
     def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
                  rcpt_options=[]):
         """This command performs an entire mail transaction.
index 82ab3980b07d6a592216e7a4399f4c294b980553..f8ad6fdb6e11523c074bf7672411e09259bb68e7 100644 (file)
@@ -1,2 +1,2 @@
-import doctest, test_support 
+import doctest, test_support
 test_support.run_doctest(doctest)
index 574726109dbeb55694e145030f117c31ec575b37..ed6e4eebf3a807f26f1a7df763092bb0300dd874 100644 (file)
@@ -19,6 +19,3 @@ try:
     marshal.loads(u"\222")
 except UnicodeError:
     pass
-
-
-
index 49066747f4a2a2466a9cc2dca27e8a5c2403bb50..fbf40cd04c6732103060987ae72aaac3f5625a57 100644 (file)
@@ -489,12 +489,12 @@ def Timer(*args, **kwargs):
 
 class _Timer(Thread):
     """Call a function after a specified number of seconds:
-    
+
     t = Timer(30.0, f, args=[], kwargs={})
     t.start()
     t.cancel() # stop the timer's action if it's still waiting
     """
-    
+
     def __init__(self, interval, function, args=[], kwargs={}):
         Thread.__init__(self)
         self.interval = interval
@@ -502,11 +502,11 @@ class _Timer(Thread):
         self.args = args
         self.kwargs = kwargs
         self.finished = Event()
-    
+
     def cancel(self):
         """Stop the timer if it hasn't finished yet"""
         self.finished.set()
-    
+
     def run(self):
         self.finished.wait(self.interval)
         if not self.finished.isSet():
index 0c63b91287070e32fcdd1bfb7714b54e13be9476..816d887ee5ce5d1b60525afa7e781de798571af2 100644 (file)
@@ -417,7 +417,7 @@ class ZipFile:
         zinfo.CRC = CRC
         zinfo.file_size = file_size
         # Seek backwards and write CRC and file sizes
-        position = self.fp.tell()      # Preserve current position in file
+        position = self.fp.tell()       # Preserve current position in file
         self.fp.seek(zinfo.header_offset + 14, 0)
         self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size,
               zinfo.file_size))