From a0236f7cbb9a1f42dc0aa6125c321b6d9c0fcd96 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Sat, 11 Jul 2020 14:35:19 -0700 Subject: [PATCH] [bgpcfgd] - Fix a key error during delete (#4946) --- src/sonic-bgpcfgd/bgpcfgd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-bgpcfgd/bgpcfgd b/src/sonic-bgpcfgd/bgpcfgd index 0fbe44602a..38d7f0671f 100755 --- a/src/sonic-bgpcfgd/bgpcfgd +++ b/src/sonic-bgpcfgd/bgpcfgd @@ -647,7 +647,7 @@ class BGPPeerMgrBase(Manager): ret_code = self.apply_op(cmd, vrf) if ret_code: log_info("Peer '(%s|%s)' has been removed" % (vrf, nbr)) - self.peers.remove(key) + self.peers.remove(peer_key) else: log_err("Peer '(%s|%s)' hasn't been removed" % (vrf, nbr))