Revision 824afb84 mininet/net.py

View differences:

mininet/net.py
355 355
        "Build mininet."
356 356
        if self.topo:
357 357
            self.buildFromTopo( self.topo )
358
        if ( self.inNamespace ):
358
        if self.inNamespace:
359 359
            self.configureControlNetwork()
360 360
        info( '*** Configuring hosts\n' )
361 361
        self.configHosts()
......
463 463
        "Parse ping output and return packets sent, received."
464 464
        # Check for downed link
465 465
        if 'connect: Network is unreachable' in pingOutput:
466
            return (1, 0)
466
            return 1, 0
467 467
        r = r'(\d+) packets transmitted, (\d+) received'
468 468
        m = re.search( r, pingOutput )
469 469
        if m is None:
470 470
            error( '*** Error: could not parse ping output: %s\n' %
471 471
                   pingOutput )
472
            return (1, 0)
472
            return 1, 0
473 473
        sent, received = int( m.group( 1 ) ), int( m.group( 2 ) )
474 474
        return sent, received
475 475

  

Also available in: Unified diff