Revision 94f088d7 mininet/util.py

View differences:

mininet/util.py
448 448
    def num( s ):
449 449
        "Convert text segment to int if necessary"
450 450
        return int( s ) if s.isdigit() else s
451
    return [  num( s ) for s in re.split( r'(\d+)', text ) ]
451
    return [  num( s ) for s in re.split( r'(\d+)', str( text ) ) ]
452 452

  
453 453
def naturalSeq( t ):
454 454
    "Natural sort key function for sequences"

Also available in: Unified diff