Skip to content

Commit

Permalink
Code optimization thanks to saylenty's suggestion.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhao2014 committed Jul 4, 2015
1 parent 1955d85 commit 89bfd09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dpkt/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ def unpack(self, buf):
# (informational), 204 (no content), and 304 (not modified) responses
# MUST NOT include a message-body. All other responses do include a
# message-body, although it MAY be of zero length.
is_body_allowed = int(self.status) >= 200 and int(self.status) != 204 \
and int(self.status) != 304
is_body_allowed = int(self.status) >= 200 and 204 != int(status) != 304
Message.unpack(self, f.read(), is_body_allowed)

def __str__(self):
Expand Down

0 comments on commit 89bfd09

Please # to comment.