aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http2/protocol.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-18 15:32:52 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-18 17:14:38 +0200
commit69e71097f7a9633a43d566b2a46aab370f07dce3 (patch)
tree117f58730fc647e219b362691f0365250b92c04f /netlib/http2/protocol.py
parent40436ffb1f8293dde9217e2a0167e6c66b11d1f1 (diff)
downloadmitmproxy-69e71097f7a9633a43d566b2a46aab370f07dce3.tar.gz
mitmproxy-69e71097f7a9633a43d566b2a46aab370f07dce3.tar.bz2
mitmproxy-69e71097f7a9633a43d566b2a46aab370f07dce3.zip
mark unused variables and arguments
Diffstat (limited to 'netlib/http2/protocol.py')
-rw-r--r--netlib/http2/protocol.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/netlib/http2/protocol.py b/netlib/http2/protocol.py
index ac89bac4..8e5f5429 100644
--- a/netlib/http2/protocol.py
+++ b/netlib/http2/protocol.py
@@ -59,8 +59,8 @@ class HTTP2Protocol(object):
while True:
frm = self.read_frame(hide)
if isinstance(frm, frame.SettingsFrame):
- assert settings_ack_frame.flags & frame.Frame.FLAG_ACK
- assert len(settings_ack_frame.settings) == 0
+ assert frm.flags & frame.Frame.FLAG_ACK
+ assert len(frm.settings) == 0
break
def perform_server_connection_preface(self, force=False):
@@ -118,11 +118,10 @@ class HTTP2Protocol(object):
old_value = '-'
self.http2_settings[setting] = value
- self.send_frame(
- frame.SettingsFrame(
- state=self,
- flags=frame.Frame.FLAG_ACK),
- hide)
+ frm = frame.SettingsFrame(
+ state=self,
+ flags=frame.Frame.FLAG_ACK)
+ self.send_frame(frm, hide)
# be liberal in what we expect from the other end
# to be more strict use: self._read_settings_ack(hide)
@@ -188,7 +187,7 @@ class HTTP2Protocol(object):
self._create_body(body, stream_id)))
def read_response(self):
- stream_id, headers, body = self._receive_transmission()
+ stream_id_, headers, body = self._receive_transmission()
return headers[':status'], headers, body
def read_request(self):