From fdec82cd9063928d789cf95145dafdf949f5db52 Mon Sep 17 00:00:00 2001 From: Simon Marsh Date: Sun, 11 Aug 2019 09:39:14 +0100 Subject: [PATCH] Update sorting function in BGP map for python 3 --- lg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lg.py b/lg.py index 9cbde28..f9c202d 100644 --- a/lg.py +++ b/lg.py @@ -505,7 +505,7 @@ def show_bgpmap(): return edges[edge_tuple] 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) + labels = sorted(labels, key=lambda x: x.endswith("*") and -1 or 1) label = escape("\r".join(labels)) e.set_label(label)