Revision 4797b420 mininet/net.py

View differences:

mininet/net.py
170 170
    def waitConnected( self, timeout=None ):
171 171
        """wait for each switch to connect to a controller,
172 172
           up to 5 seconds
173
           timeout: max time to wait for switches to connect.
173
           timeout: time to wait, or None to wait indefinitely
174 174
           returns: True if all switches are connected"""
175 175
        info( '***waiting for switches to connect\n' )
176 176
        time = 0
......
186 186
                    remaining.remove( switch )
187 187
            if connected:
188 188
                break
189
        if time >= timeout and not timeout ==  None:
189
        if time >= timeout and timeout is not  None:
190 190
            warn( 'Timed out after %d seconds\n' % time )
191 191
            for switch in self.switches:
192 192
                if not switch.connected():

Also available in: Unified diff