Skip to content

Commit

Permalink
Added support for string SAI_NULL_OBJECT_ID for Thrift RPC (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Vinod Kumar <[email protected]>
  • Loading branch information
vikumarks committed Sep 15, 2023
1 parent 4914679 commit 56dc3ef
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 56dc3ef

Please sign in to comment.