mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-21 14:34:43 +01:00
Basic python reformatting
Transform all tabs to spaces and remove trailing spaces.
This commit is contained in:
parent
ca4550ae74
commit
a45ae45408
5
bird.py
5
bird.py
|
@ -171,7 +171,4 @@ class BirdSocket:
|
|||
return True, parsed_string
|
||||
|
||||
|
||||
__all__ = ['BirdSocketSingleton' , 'BirdSocket' ]
|
||||
|
||||
|
||||
|
||||
__all__ = ['BirdSocketSingleton', 'BirdSocket']
|
||||
|
|
2
lg.py
2
lg.py
|
@ -461,7 +461,6 @@ def show_bgpmap():
|
|||
if "%s*" % label_without_star not in labels:
|
||||
labels = [ kwargs["label"] ] + [ l for l in labels if not l.startswith(label_without_star) ]
|
||||
labels = sorted(labels, cmp=lambda x,y: x.endswith("*") and -1 or 1)
|
||||
|
||||
label = escape("\r".join(labels))
|
||||
e.set_label(label)
|
||||
return edges[edge_tuple]
|
||||
|
@ -511,7 +510,6 @@ def show_bgpmap():
|
|||
else:
|
||||
hop_label = ""
|
||||
|
||||
|
||||
if _as == asmap[-1]:
|
||||
add_node(_as, fillcolor="#F5A9A9", shape="box", )
|
||||
else:
|
||||
|
|
|
@ -78,9 +78,8 @@ def traceroute():
|
|||
src = []
|
||||
if request.path == '/traceroute6':
|
||||
traceroute = traceroute6
|
||||
if app.config.get("IPV6_SOURCE",""):
|
||||
if app.config.get("IPV6_SOURCE", ""):
|
||||
src = [ "-s", app.config.get("IPV6_SOURCE") ]
|
||||
|
||||
else:
|
||||
traceroute = traceroute4
|
||||
if app.config.get("IPV4_SOURCE",""):
|
||||
|
@ -97,11 +96,9 @@ def traceroute():
|
|||
options = [ '-A', '-q1', '-N32', '-w1', '-m15' ]
|
||||
command = traceroute + src + options + [ query ]
|
||||
result = subprocess.Popen( command , stdout=subprocess.PIPE).communicate()[0].decode('utf-8', 'ignore').replace("\n","<br>")
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@app.route("/bird")
|
||||
@app.route("/bird6")
|
||||
def bird():
|
||||
|
|
Loading…
Reference in a new issue