Apparently Python 3 types aren't ordered
This commit is contained in:
+4
-2
@@ -549,7 +549,8 @@ class Mininet( object ):
|
|||||||
switch.start( self.controllers )
|
switch.start( self.controllers )
|
||||||
started = {}
|
started = {}
|
||||||
for swclass, switches in groupby(
|
for swclass, switches in groupby(
|
||||||
sorted( self.switches, key=type ), type ):
|
sorted( self.switches,
|
||||||
|
key=lambda s: str( type( s ) ) ), type ):
|
||||||
switches = tuple( switches )
|
switches = tuple( switches )
|
||||||
if hasattr( swclass, 'batchStartup' ):
|
if hasattr( swclass, 'batchStartup' ):
|
||||||
success = swclass.batchStartup( switches )
|
success = swclass.batchStartup( switches )
|
||||||
@@ -576,7 +577,8 @@ class Mininet( object ):
|
|||||||
info( '*** Stopping %i switches\n' % len( self.switches ) )
|
info( '*** Stopping %i switches\n' % len( self.switches ) )
|
||||||
stopped = {}
|
stopped = {}
|
||||||
for swclass, switches in groupby(
|
for swclass, switches in groupby(
|
||||||
sorted( self.switches, key=type ), type ):
|
sorted( self.switches,
|
||||||
|
key=lambda s: str( type( s ) ) ), type ):
|
||||||
switches = tuple( switches )
|
switches = tuple( switches )
|
||||||
if hasattr( swclass, 'batchShutdown' ):
|
if hasattr( swclass, 'batchShutdown' ):
|
||||||
success = swclass.batchShutdown( switches )
|
success = swclass.batchShutdown( switches )
|
||||||
|
|||||||
Reference in New Issue
Block a user