We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 435af2e commit 59e6460Copy full SHA for 59e6460
1 file changed
src/h2/frame_buffer.py
@@ -149,13 +149,11 @@ def __next__(self):
149
# Confirm the frame has an appropriate length.
150
self._validate_frame_length(length)
151
152
- # Don't try to parse the body if we didn't get a frame we know about:
153
- # there's nothing we can do with it anyway.
154
- if f is not None:
155
- try:
156
- f.parse_body(memoryview(self.data[9:9+length]))
157
- except InvalidFrameError:
158
- raise FrameDataMissingError("Frame data missing or invalid")
+ # Try to parse the frame body
+ try:
+ f.parse_body(memoryview(self.data[9:9+length]))
+ except InvalidFrameError:
+ raise FrameDataMissingError("Frame data missing or invalid")
159
160
# At this point, as we know we'll use or discard the entire frame, we
161
# can update the data.
0 commit comments