File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,11 @@ def create_rtbh(rule, message_type=ANNOUNCE):
100
100
try :
101
101
if current_app .config ["USE_MULTI_NEIGHBOR" ] and rule .community .comm :
102
102
if rule .community .comm in current_app .config ["MULTI_NEIGHBOR" ].keys ():
103
- target = current_app .config ["MULTI_NEIGHBOR" ].get (rule .community .comm )
104
- neighbor = "neighbor {target} " .format (target = target )
103
+ targets = current_app .config ["MULTI_NEIGHBOR" ].get (rule .community .comm )
105
104
else :
106
105
targets = current_app .config ["MULTI_NEIGHBOR" ].get ("primary" )
107
- neighbor = prepare_multi_neighbor ( targets )
108
-
106
+
107
+ neighbor = prepare_multi_neighbor ( targets )
109
108
else :
110
109
neighbor = ""
111
110
except KeyError :
@@ -253,9 +252,9 @@ def sanitize_mask(rule_mask, default_mask=IPV4_DEFMASK):
253
252
return default_mask
254
253
255
254
256
- def prepare_multi_neighbor (targets ):
255
+ def prepare_multi_neighbor (targets : list ):
257
256
"""
258
257
prepare multi neighbor string
259
258
"""
260
- neigbors = ["neighbor {}" . format ( tgt ) for tgt in targets ]
259
+ neigbors = [f "neighbor { tgt } " for tgt in targets ]
261
260
return ", " .join (neigbors ) + " "
You can’t perform that action at this time.
0 commit comments