Skip to content

Commit

Permalink
Fix oper status check (#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Lisovskyi <[email protected]>
  • Loading branch information
yuriilisovskyi authored Sep 13, 2023
1 parent 03aa142 commit 3ed52e8
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 3ed52e8

Please sign in to comment.