2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Change one conditional to perhaps be a bit more readable

This commit is contained in:
Jarrod Johnson 2013-06-25 08:20:16 -04:00
parent d660073f77
commit 552ae49c58

View File

@ -633,7 +633,7 @@ class ipmi_session:
'''
def _parse_ipmi_payload(self,payload):
#For now, skip the checksums since we are in LAN only, TODO(jbjohnso): if implementing other channels, add checksum checks here
if not (payload[4] == self.seqlun and payload[1]>>2 == self.expectednetfn and payload[5] == self.expectedcmd):
if (payload[4] != self.seqlun or payload[1]>>2 != self.expectednetfn or payload[5] != self.expectedcmd):
return -1 #this payload is not a match for our outstanding ipmi packet
if hasattr(self,'hasretried') and self.hasretried:
self.hasretried=0