From 7cc5a4dd0d57e2797c4af541c19de1ed1cb23d5f Mon Sep 17 00:00:00 2001 From: Praveen Chaudhary Date: Wed, 11 Nov 2020 16:59:46 -0800 Subject: [PATCH] [sonic_yang_ext.py]: Minor changes for Python3 build. Signed-off-by: Praveen Chaudhary --- src/sonic-yang-mgmt/sonic_yang_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py index 1f0a072be450..e85cdb42ff0f 100644 --- a/src/sonic-yang-mgmt/sonic_yang_ext.py +++ b/src/sonic-yang-mgmt/sonic_yang_ext.py @@ -377,7 +377,8 @@ def _xlateContainer(self, model, yang, config, table): ## Handle other leaves in container, leafDict = self._createLeafDict(model) - for vKey in configC.keys(): + vKeys = list(configC.keys()) + for vKey in vKeys: #vkey must be a leaf\leaf-list\choice in container if leafDict.get(vKey): self.sysLog(syslog.LOG_DEBUG, "xlateContainer vkey {}".format(vKey))