Merge pull request #249 from yeasy/master
Close the file when done with it.
This commit is contained in:
+3
-2
@@ -160,7 +160,7 @@ class CLI( Cmd ):
|
|||||||
self.mn.pingPair()
|
self.mn.pingPair()
|
||||||
|
|
||||||
def do_pingallfull( self, _line ):
|
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()
|
self.mn.pingAllFull()
|
||||||
|
|
||||||
def do_pingpairfull( self, _line ):
|
def do_pingpairfull( self, _line ):
|
||||||
@@ -187,7 +187,7 @@ class CLI( Cmd ):
|
|||||||
error( 'invalid number of args: iperf src dst\n' )
|
error( 'invalid number of args: iperf src dst\n' )
|
||||||
|
|
||||||
def do_iperfudp( self, line ):
|
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()
|
args = line.split()
|
||||||
if not args:
|
if not args:
|
||||||
self.mn.iperf( l4Type='UDP' )
|
self.mn.iperf( l4Type='UDP' )
|
||||||
@@ -297,6 +297,7 @@ class CLI( Cmd ):
|
|||||||
break
|
break
|
||||||
except IOError:
|
except IOError:
|
||||||
error( 'error reading file %s\n' % args[ 0 ] )
|
error( 'error reading file %s\n' % args[ 0 ] )
|
||||||
|
self.inputFile.close()
|
||||||
self.inputFile = None
|
self.inputFile = None
|
||||||
|
|
||||||
def do_dpctl( self, line ):
|
def do_dpctl( self, line ):
|
||||||
|
|||||||
Reference in New Issue
Block a user