conforming to style, and fixing documentation
This commit is contained in:
+2
-2
@@ -170,7 +170,7 @@ class Mininet( object ):
|
|||||||
def waitConnected( self, timeout=None ):
|
def waitConnected( self, timeout=None ):
|
||||||
"""wait for each switch to connect to a controller,
|
"""wait for each switch to connect to a controller,
|
||||||
up to 5 seconds
|
up to 5 seconds
|
||||||
timeout: max time to wait for switches to connect.
|
timeout: time to wait, or None to wait indefinitely
|
||||||
returns: True if all switches are connected"""
|
returns: True if all switches are connected"""
|
||||||
info( '***waiting for switches to connect\n' )
|
info( '***waiting for switches to connect\n' )
|
||||||
time = 0
|
time = 0
|
||||||
@@ -186,7 +186,7 @@ class Mininet( object ):
|
|||||||
remaining.remove( switch )
|
remaining.remove( switch )
|
||||||
if connected:
|
if connected:
|
||||||
break
|
break
|
||||||
if time >= timeout and not timeout == None:
|
if time >= timeout and timeout is not None:
|
||||||
warn( 'Timed out after %d seconds\n' % time )
|
warn( 'Timed out after %d seconds\n' % time )
|
||||||
for switch in self.switches:
|
for switch in self.switches:
|
||||||
if not switch.connected():
|
if not switch.connected():
|
||||||
|
|||||||
Reference in New Issue
Block a user