From 89933976f6b61a757c8e61c780b45810008b9fcb Mon Sep 17 00:00:00 2001 From: stormliang Date: Wed, 10 Aug 2022 13:50:01 +0000 Subject: [PATCH] fix comments --- src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py index 6a36f6fa0ae3..4bdd488fc2eb 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py @@ -222,7 +222,7 @@ def __generate_names(deployment_id, community_value, neighbor_type): :param community_value: community, which we want to use to filter prefixes :return: a dictionary with names """ - if neighbor_type == '': + if not neighbor_type: if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: community_name = BGPAllowListMgr.EMPTY_COMMUNITY else: @@ -673,7 +673,7 @@ def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call, neighbor_type :rm_2_call: a dictionary: key - name of a route-map, value - name of a route-map call defined for the route-map """ ret = set() - if neighbor_type == '': + if not neighbor_type: target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_V' % deployment_id else: target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_V' % (deployment_id, neighbor_type)