Skip to content
Snippets Groups Projects
Commit e65dc4c6 authored by Bob Lantz's avatar Bob Lantz
Browse files

OVSLink: use isinstance() to detect OVSSwitch subclasses

parent d4be9271
No related branches found
No related tags found
No related merge requests found
......@@ -501,8 +501,8 @@ class OVSLink( Link ):
def __init__( self, node1, node2, **kwargs ):
"See Link.__init__() for options"
self.isPatchLink = False
if ( type( node1 ) is mininet.node.OVSSwitch and
type( node2 ) is mininet.node.OVSSwitch ):
if ( isinstance( node1, mininet.node.OVSSwitch ) and
isinstance( node2, mininet.node.OVSSwitch ) ):
self.isPatchLink = True
kwargs.update( cls1=OVSIntf, cls2=OVSIntf )
Link.__init__( self, node1, node2, **kwargs )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment