THRIFT-3596 Better conformance to PEP8
This closes #832
diff --git a/test/features/util.py b/test/features/util.py
index e364136..e4997d0 100644
--- a/test/features/util.py
+++ b/test/features/util.py
@@ -11,30 +11,30 @@
def add_common_args(p):
- p.add_argument('--host', default='localhost')
- p.add_argument('--port', type=int, default=9090)
- p.add_argument('--protocol', default='binary')
- p.add_argument('--transport', default='buffered')
- p.add_argument('--ssl', action='store_true')
+ p.add_argument('--host', default='localhost')
+ p.add_argument('--port', type=int, default=9090)
+ p.add_argument('--protocol', default='binary')
+ p.add_argument('--transport', default='buffered')
+ p.add_argument('--ssl', action='store_true')
def parse_common_args(argv):
- p = argparse.ArgumentParser()
- add_common_args(p)
- return p.parse_args(argv)
+ p = argparse.ArgumentParser()
+ add_common_args(p)
+ return p.parse_args(argv)
def init_protocol(args):
- sock = TSocket(args.host, args.port, socket_family=socket.AF_INET)
- sock.setTimeout(500)
- trans = {
- 'buffered': TBufferedTransport,
- 'framed': TFramedTransport,
- 'http': THttpClient,
- }[args.transport](sock)
- trans.open()
- return {
- 'binary': TBinaryProtocol,
- 'compact': TCompactProtocol,
- 'json': TJSONProtocol,
- }[args.protocol](trans)
+ sock = TSocket(args.host, args.port, socket_family=socket.AF_INET)
+ sock.setTimeout(500)
+ trans = {
+ 'buffered': TBufferedTransport,
+ 'framed': TFramedTransport,
+ 'http': THttpClient,
+ }[args.transport](sock)
+ trans.open()
+ return {
+ 'binary': TBinaryProtocol,
+ 'compact': TCompactProtocol,
+ 'json': TJSONProtocol,
+ }[args.protocol](trans)