Skip to content

Commit 59e6460

Browse files
committed
remove unneeded condition
This is a leftover from 970171a and 165ac11 refactoring.
1 parent 435af2e commit 59e6460

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/h2/frame_buffer.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,11 @@ def __next__(self):
149149
# Confirm the frame has an appropriate length.
150150
self._validate_frame_length(length)
151151

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")
152+
# Try to parse the frame body
153+
try:
154+
f.parse_body(memoryview(self.data[9:9+length]))
155+
except InvalidFrameError:
156+
raise FrameDataMissingError("Frame data missing or invalid")
159157

160158
# At this point, as we know we'll use or discard the entire frame, we
161159
# can update the data.

0 commit comments

Comments
 (0)