Revision b7268856

View differences:

mininet/net.py
246 246
        if not controller:
247 247
            controller = self.controller
248 248
        # Construct new controller if one is not given
249
        if isinstance(name, Controller):
249
        if issubclass( name.__class__, Controller ):
250 250
            controller_new = name
251 251
            # Pylint thinks controller is a str()
252 252
            # pylint: disable=E1103
......
357 357
            if type( classes ) is not list:
358 358
                classes = [ classes ]
359 359
            for i, cls in enumerate( classes ):
360
                self.addController( 'c%d' % i, cls )
360
                # Allow Controller objects because nobody understands currying
361
                if issubclass( cls.__class__, Controller ):
362
                    self.addController( cls )
363
                else:
364
                    self.addController( 'c%d' % i, cls )
361 365

  
362 366
        info( '*** Adding hosts:\n' )
363 367
        for hostName in topo.hosts():

Also available in: Unified diff