aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-04-16 11:13:07 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-04-16 17:25:11 +0200
commitf020aca297e8a6c9f7b6a6e08e583847d37edace (patch)
treeb7573c8faefcf5c92d21f1bd297fc72a8da3393f /test/functional/test_framework
parent0d6992168c2bda85b18fda8f6dea08da433a0dc9 (diff)
Minor Python cleanups to make flake8 pass with the new rules enabled
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/socks5.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/functional/test_framework/socks5.py b/test/functional/test_framework/socks5.py
index 4721809a3b..581de0ed5d 100644
--- a/test/functional/test_framework/socks5.py
+++ b/test/functional/test_framework/socks5.py
@@ -4,12 +4,14 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Dummy Socks5 server for testing."""
-import socket, threading, queue
+import socket
+import threading
+import queue
import logging
logger = logging.getLogger("TestFramework.socks5")
-### Protocol constants
+# Protocol constants
class Command:
CONNECT = 0x01
@@ -18,7 +20,7 @@ class AddressType:
DOMAINNAME = 0x03
IPV6 = 0x04
-### Utility functions
+# Utility functions
def recvall(s, n):
"""Receive n bytes from a socket, or fail."""
rv = bytearray()
@@ -30,7 +32,7 @@ def recvall(s, n):
n -= len(d)
return rv
-### Implementation classes
+# Implementation classes
class Socks5Configuration():
"""Proxy configuration."""
def __init__(self):
@@ -141,7 +143,7 @@ class Socks5Server():
thread = threading.Thread(None, conn.handle)
thread.daemon = True
thread.start()
-
+
def start(self):
assert(not self.running)
self.running = True