Skip to content

Commit

Permalink
removed whitespace in kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
rpigott committed Jan 31, 2019
1 parent 92fc87b commit 7fa2097
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mitmproxy/proxy/protocol/websocket.py
Expand Up @@ -67,7 +67,7 @@ def __init__(self, ctx, handshake_flow):
if server_extensions:
server_extensions[0].finalize(handshake_flow.response.headers['Sec-WebSocket-Extensions'])

request = Request(extensions = client_extensions, host = handshake_flow.request.host, target = handshake_flow.request.path)
request = Request(extensions=client_extensions, host=handshake_flow.request.host, target=handshake_flow.request.path)
data = self.connections[self.server_conn].send(request)
self.connections[self.client_conn].receive_data(data)

Expand Down Expand Up @@ -129,11 +129,11 @@ def get_chunk(payload):
yield (payload[i:i + chunk_size], True if i + chunk_size >= len(payload) else False)

for chunk, final in get_chunk(websocket_message.content):
data = self.connections[other_conn].send(Message(data = chunk, message_finished = final))
data = self.connections[other_conn].send(Message(data=chunk, message_finished=final))
other_conn.send(data)

if self.flow.stream:
data = self.connections[other_conn].send(Message(data = event.data, message_finished = event.message_finished))
data = self.connections[other_conn].send(Message(data=event.data, message_finished=event.message_finished))
other_conn.send(data)
return True

Expand Down Expand Up @@ -174,7 +174,7 @@ def _inject_messages(self, endpoint, message_queue):
while True:
try:
payload = message_queue.get_nowait()
data = self.connections[endpoint].send(Message(data = payload, message_finished = True))
data = self.connections[endpoint].send(Message(data=payload, message_finished=True))
endpoint.send(data)
except queue.Empty:
break
Expand Down

0 comments on commit 7fa2097

Please sign in to comment.