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))