summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlars4839 <lars4839@umn.edu>2016-11-14 18:19:54 -0600
committerCory Benfield <lukasaoz@gmail.com>2016-11-16 10:03:57 +0000
commit73f059d9f7a6b51a1a578e6e90bc57c461032dab (patch)
treeef9ee8a59c8bccc66301d5b1bed46236aa4d32ac
parente61a98bccffd6f23fa5e2fab65b99d8e124d1018 (diff)
downloadurllib3-73f059d9f7a6b51a1a578e6e90bc57c461032dab.tar.gz
Fix flake8 E305 errors
(cherry picked from commit 15a1efae8c4af5bf2e08cd33a8b38f9a1312e54f)
-rw-r--r--dummyserver/handlers.py1
-rwxr-xr-xdummyserver/proxy.py1
-rwxr-xr-xdummyserver/server.py1
-rw-r--r--urllib3/__init__.py1
-rw-r--r--urllib3/util/connection.py1
5 files changed, 5 insertions, 0 deletions
diff --git a/dummyserver/handlers.py b/dummyserver/handlers.py
index ee39fa18..bc6ad94c 100644
--- a/dummyserver/handlers.py
+++ b/dummyserver/handlers.py
@@ -327,6 +327,7 @@ def _parse_header(line):
pdict[name] = value
return key, pdict
+
# TODO: make the following conditional as soon as we know a version
# which does not require this fix.
# See https://github.com/facebook/tornado/issues/868
diff --git a/dummyserver/proxy.py b/dummyserver/proxy.py
index 5b9984d1..907dd074 100755
--- a/dummyserver/proxy.py
+++ b/dummyserver/proxy.py
@@ -129,6 +129,7 @@ def run_proxy(port, start_ioloop=True):
if start_ioloop:
ioloop.start()
+
if __name__ == '__main__':
port = 8888
if len(sys.argv) > 1:
diff --git a/dummyserver/server.py b/dummyserver/server.py
index c3eb4cfe..89001e23 100755
--- a/dummyserver/server.py
+++ b/dummyserver/server.py
@@ -72,6 +72,7 @@ def _has_ipv6(host):
sock.close()
return has_ipv6
+
# Some systems may have IPv6 support but DNS may not be configured
# properly. We can not count that localhost will resolve to ::1 on all
# systems. See https://github.com/shazow/urllib3/pull/611 and
diff --git a/urllib3/__init__.py b/urllib3/__init__.py
index 4aa596d0..11666507 100644
--- a/urllib3/__init__.py
+++ b/urllib3/__init__.py
@@ -71,6 +71,7 @@ def add_stderr_logger(level=logging.DEBUG):
logger.debug('Added a stderr logging handler to logger: %s', __name__)
return handler
+
# ... Clean up.
del NullHandler
diff --git a/urllib3/util/connection.py b/urllib3/util/connection.py
index 5e761352..3d608772 100644
--- a/urllib3/util/connection.py
+++ b/urllib3/util/connection.py
@@ -141,4 +141,5 @@ def _has_ipv6(host):
sock.close()
return has_ipv6
+
HAS_IPV6 = _has_ipv6('::1')