From d8c30910cb284956229099640abd252dc5a0527d Mon Sep 17 00:00:00 2001 From: lantz Date: Sat, 9 Jan 2021 21:15:27 -0800 Subject: [PATCH] ubuntu 14 code check fixes so travis can pass (#1006) --- examples/treeping64.py | 4 +--- mininet/cli.py | 2 +- mininet/nodelib.py | 2 -- mininet/test/test_walkthrough.py | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/treeping64.py b/examples/treeping64.py index 35beec8..c72943c 100755 --- a/examples/treeping64.py +++ b/examples/treeping64.py @@ -4,7 +4,7 @@ from mininet.log import setLogLevel, info -from mininet.node import UserSwitch, OVSKernelSwitch, Host, Controller +from mininet.node import UserSwitch, OVSKernelSwitch, Host from mininet.topolib import TreeNet @@ -18,8 +18,6 @@ class HostV4( Host ): self.cmd( 'sysctl -w net.ipv6.conf.' + cfg ) - - def treePing64(): "Run ping test on 64-node tree networks." diff --git a/mininet/cli.py b/mininet/cli.py index be20ca8..5c644ca 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -399,7 +399,7 @@ class CLI( Cmd ): error( 'invalid command: ' 'switch {start, stop}\n' ) - def do_wait( self, line ): + def do_wait( self, _line ): "Wait until all switches have connected to a controller" self.mn.waitConnected() diff --git a/mininet/nodelib.py b/mininet/nodelib.py index 02fbf00..1d5106e 100644 --- a/mininet/nodelib.py +++ b/mininet/nodelib.py @@ -136,8 +136,6 @@ class NAT( Node ): # Instruct the kernel to perform forwarding self.cmd( 'sysctl net.ipv4.ip_forward=1' ) - - def terminate( self ): "Stop NAT/forwarding between Mininet and external network" # Remote NAT rules diff --git a/mininet/test/test_walkthrough.py b/mininet/test/test_walkthrough.py index f418d2d..2b26e18 100755 --- a/mininet/test/test_walkthrough.py +++ b/mininet/test/test_walkthrough.py @@ -29,8 +29,8 @@ class testWalkthrough( unittest.TestCase ): prompt = 'mininet>' - - def setup( self ): + @staticmethod + def setup(): "Be paranoid and run cleanup() before each test" cleanup()