Skip to content

Commit

Permalink
Fix oper status check (opencomputeproject#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Lisovskyi <[email protected]>
Signed-off-by: selldinesh <[email protected]>
  • Loading branch information
yuriilisovskyi authored and selldinesh committed Oct 16, 2023
1 parent fa12688 commit 0c9d875
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/sai_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ def set_sku_mode(self, sku):

def assert_port_oper_up(self, port_oid, tout=15):
for i in range(tout):
status, data = self.get(port_oid, ["SAI_PORT_ATTR_OPER_STATUS"])
assert status == "SAI_STATUS_SUCCESS"
data = self.get(port_oid, ["SAI_PORT_ATTR_OPER_STATUS"])
if data.value() == "SAI_PORT_OPER_STATUS_UP":
return
if i + 1 < tout:
Expand Down

0 comments on commit 0c9d875

Please sign in to comment.