From 622665952ca072a6276917c252758bbe19091a0d Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 24 Aug 2015 16:52:32 +0200 Subject: minor stylistic fixes --- netlib/http/http2/protocol.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'netlib') diff --git a/netlib/http/http2/protocol.py b/netlib/http/http2/protocol.py index e032c2a0..1d6e0168 100644 --- a/netlib/http/http2/protocol.py +++ b/netlib/http/http2/protocol.py @@ -123,6 +123,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): timestamp_start, timestamp_end, ) + # FIXME: We should not do this. request.stream_id = stream_id return request @@ -150,7 +151,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): if include_body: timestamp_end = time.time() - else: # pragma: no cover + else: timestamp_end = None response = http.Response( @@ -274,7 +275,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): return True def _handle_unexpected_frame(self, frm): - if self.unhandled_frame_cb is not None: + if self.unhandled_frame_cb: self.unhandled_frame_cb(frm) def _receive_settings(self, hide=False): @@ -364,7 +365,9 @@ class HTTP2Protocol(semantics.ProtocolMixin): return [frm.to_bytes() for frm in frms] def _receive_transmission(self, stream_id=None, include_body=True): - # TODO: include_body is not respected + if not include_body: + raise NotImplementedError() + body_expected = True header_block_fragment = b'' -- cgit v1.2.3