From 5d6c6a5b42cbe1613ac29809485ba3ade6d83958 Mon Sep 17 00:00:00 2001 From: vikumarks <119973184+vikumarks@users.noreply.github.com> Date: Thu, 14 Sep 2023 15:36:27 -0700 Subject: [PATCH] Added support for string SAI_NULL_OBJECT_ID Signed-off-by: Vinod Kumar --- common/sai_client/sai_thrift_client/sai_thrift_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/sai_client/sai_thrift_client/sai_thrift_utils.py b/common/sai_client/sai_thrift_client/sai_thrift_utils.py index e7152fa2..6f2b1093 100644 --- a/common/sai_client/sai_thrift_client/sai_thrift_utils.py +++ b/common/sai_client/sai_thrift_client/sai_thrift_utils.py @@ -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)