Revision c273f490 mininet/topo.py

View differences:

mininet/topo.py
45 45
        entry = self.edge[ dst ][ src ] = self.edge[ src ][ dst ]
46 46
        # If no key, pick next ordinal number
47 47
        if key is None:
48
            keys = [ k for k in entry.keys() if type( k ) is int ]
48
            keys = [ k for k in entry.keys() if isinstance( k, int ) ]
49 49
            key = max( [ 0 ] + keys ) + 1
50 50
        entry[ key ] = attr_dict
51 51
        return key

Also available in: Unified diff