From fc7c919b43cf0fd48982c8deadc6054a94f4fe2d Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Wed, 11 Dec 2013 14:41:21 +0800 Subject: [PATCH 1/4] Close the file when done with it. --- mininet/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mininet/cli.py b/mininet/cli.py index 3ca190f..67823de 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -297,6 +297,7 @@ class CLI( Cmd ): break except IOError: error( 'error reading file %s\n' % args[ 0 ] ) + self.inputFile.close() self.inputFile = None def do_dpctl( self, line ): From 3e2333e5edf848cc1acd6f04a54d6894e3b5e090 Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Wed, 11 Dec 2013 15:19:24 +0800 Subject: [PATCH 2/4] Correct the comments of do_pingallfull() and do_iperfudp() --- mininet/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index 67823de..aa3c2b3 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -160,7 +160,7 @@ class CLI( Cmd ): self.mn.pingPair() def do_pingallfull( self, _line ): - "Ping between first two hosts, returns all ping results." + "Ping between all hosts, returns all ping results." self.mn.pingAllFull() def do_pingpairfull( self, _line ): @@ -187,7 +187,7 @@ class CLI( Cmd ): error( 'invalid number of args: iperf src dst\n' ) def do_iperfudp( self, line ): - "Simple iperf TCP test between two (optionally specified) hosts." + "Simple iperf UDP test between two (optionally specified) hosts." args = line.split() if not args: self.mn.iperf( l4Type='UDP' ) From 8bb830824b76e6fcc5f6bad6256b0fa8780c9eaa Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Wed, 11 Dec 2013 14:41:21 +0800 Subject: [PATCH 3/4] Close the file when done with it. --- mininet/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mininet/cli.py b/mininet/cli.py index 2ff9825..3df99ad 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -297,6 +297,7 @@ class CLI( Cmd ): break except IOError: error( 'error reading file %s\n' % args[ 0 ] ) + self.inputFile.close() self.inputFile = None def do_dpctl( self, line ): From e6869112100f67bc0ee9466348d4118d0dc830dd Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Wed, 11 Dec 2013 15:19:24 +0800 Subject: [PATCH 4/4] Correct the comments of do_pingallfull() and do_iperfudp() --- mininet/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index 3df99ad..08638c8 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -160,7 +160,7 @@ class CLI( Cmd ): self.mn.pingPair() def do_pingallfull( self, _line ): - "Ping between first two hosts, returns all ping results." + "Ping between all hosts, returns all ping results." self.mn.pingAllFull() def do_pingpairfull( self, _line ): @@ -187,7 +187,7 @@ class CLI( Cmd ): error( 'invalid number of args: iperf src dst\n' ) def do_iperfudp( self, line ): - "Simple iperf TCP test between two (optionally specified) hosts." + "Simple iperf UDP test between two (optionally specified) hosts." args = line.split() if not args: self.mn.iperf( l4Type='UDP' )