diff --git a/mininet/topo.py b/mininet/topo.py index 1331306a7a42be57f62a81b6f77160d38c8902aa..af3eac5f55707d83217d85b5101ed27134462fb0 100644 --- a/mininet/topo.py +++ b/mininet/topo.py @@ -207,7 +207,7 @@ def links( self, sort=False, withKeys=False, withInfo=False ): return links # Ignore info when sorting tupleSize = 3 if withKeys else 2 - return sorted( links, key=( lambda l: naturalSeq( l[ 0 : tupleSize ] ) ) ) + return sorted( links, key=( lambda l: naturalSeq( l[ :tupleSize ] ) ) ) # This legacy port management mechanism is clunky and will probably # be removed at some point.