Skip to content

Commit

Permalink
Added support for string SAI_NULL_OBJECT_ID
Browse files Browse the repository at this point in the history
Signed-off-by: Vinod Kumar <[email protected]>
  • Loading branch information
vikumarks committed Sep 14, 2023
1 parent 3ed52e8 commit 5d6c6a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/sai_client/sai_thrift_client/sai_thrift_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def object_id(oid):
"16" => 16
"oid:0x10" => 16
"""
if oid == None or oid == 'null':
if oid == None or oid == 'null' or oid == 'SAI_NULL_OBJECT_ID':
return 0
if isinstance(oid, str) and oid.startswith('oid:0x'):
return int(oid[4:], 16)
Expand Down

0 comments on commit 5d6c6a5

Please sign in to comment.