]> granicus.if.org Git - python/commitdiff
Remove tabs.
authorBrett Cannon <bcannon@gmail.com>
Wed, 15 Sep 2004 23:26:23 +0000 (23:26 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 15 Sep 2004 23:26:23 +0000 (23:26 +0000)
Lib/httplib.py
Lib/test/test_httplib.py

index c88b172a360dfd4ef35ae6c5d36b00d53c93e61e..1fb5e8a12b4a4ba9c6c290beded18675d3cc3144 100644 (file)
@@ -534,8 +534,8 @@ class HTTPConnection:
                 host = host[:i]
             else:
                 port = self.default_port
-           if host[0] == '[' and host[-1] == ']':
-               host = host[1:-1]
+            if host[0] == '[' and host[-1] == ']':
+                host = host[1:-1]
         self.host = host
         self.port = port
 
index b0d73387e08559fae6d055640b263804a6d24535..deca23ac6110a7435d065509a28010aae65e7508 100644 (file)
@@ -121,14 +121,14 @@ def _test():
     for hp,h,p in (("[fe80::207:e9ff:fe9b]:8000", "fe80::207:e9ff:fe9b", 8000), 
                    ("www.python.org:80", "www.python.org", 80),
                    ("www.python.org", "www.python.org", 80),
-                  ("[fe80::207:e9ff:fe9b]", "fe80::207:e9ff:fe9b", 80)):
+                   ("[fe80::207:e9ff:fe9b]", "fe80::207:e9ff:fe9b", 80)):
         try:
             http = httplib.HTTP(hp)
         except httplib.InvalidURL:
             print "InvalidURL raised erroneously"
-       c = http._conn
-       if h != c.host: raise AssertionError, ("Host incorrectly parsed", h, c.host)
-       if p != c.port: raise AssertionError, ("Port incorrectly parsed", p, c.host)
+        c = http._conn
+        if h != c.host: raise AssertionError, ("Host incorrectly parsed", h, c.host)
+        if p != c.port: raise AssertionError, ("Port incorrectly parsed", p, c.host)
 
     # test response with multiple message headers with the same field name.
     text = ('HTTP/1.1 200 OK\r\n'