Skip to content

Commit c67a1ab

Browse files
authored
Remove Flask banner (#1812)
1 parent 664a586 commit c67a1ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ansible/library/exabgp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
from flask import Flask, request
6565
import sys
6666
67+
#Disable banner msg from app.run, or the output might be caught by exabgp and run as command
68+
cli = sys.modules['flask.cli']
69+
cli.show_server_banner = lambda *x: None
70+
6771
app = Flask(__name__)
6872
6973
# Setup a command route to listen for prefix advertisements
@@ -179,7 +183,7 @@ def setup_exabgp_conf(name, router_id, local_ip, peer_ip, local_asn, peer_asn, p
179183
group_updates=group_updates)
180184
with open("/etc/exabgp/%s.conf" % name, 'w') as out_file:
181185
out_file.write(data)
182-
186+
183187
def remove_exabgp_conf(name):
184188
try:
185189
os.remove("/etc/exabgp/%s.conf" % name)

0 commit comments

Comments
 (0)