rtslib/utils.py
def _cleanse_wwn(wwn_type, wwn):
    '''
    Some wwns may have alternate text representations. Adjust to our
    preferred representation.
    '''
    wwn = str(wwn.strip()).lower()

    if wwn_type in ('naa', 'eui', 'ib'):
        if wwn.startswith("0x"):
            wwn = wwn[2:]
        wwn = wwn.replace("-", "")
        wwn = wwn.replace(":", "")

        if not (wwn.startswith("naa.") or wwn.startswith("eui.") or \
            wwn.startswith("ib.")):
            wwn = wwn_type + "." + wwn

    return wwn

    Some wwns may have alternate text representations. Adjust to our
    preferred representation.
    
Some wwns may have alternate text representations. Adjust to our
preferred representation.
Some wwns may have alternate text representations . Adjust to our preferred representation .
def _cleanse_wwn(wwn_type, wwn):
    wwn = str(wwn.strip()).lower()
    if wwn_type in ('naa', 'eui', 'ib'):
        if wwn.startswith("0x"):
            wwn = wwn[2:]
        wwn = wwn.replace("-", "")
        wwn = wwn.replace(":", "")
        if not (wwn.startswith("naa.") or wwn.startswith("eui.") or \
            wwn.startswith("ib.")):
            wwn = wwn_type + "." + wwn
    return wwn
def _cleanse_wwn ( wwn_type , wwn ) : wwn = str ( wwn . strip ( ) ) . lower ( ) if wwn_type in ( 'naa' , 'eui' , 'ib' ) : if wwn . startswith ( "0x" ) : wwn = wwn [ 2 : ] wwn = wwn . replace ( "-" , "" ) wwn = wwn . replace ( ":" , "" ) if not ( wwn . startswith ( "naa." ) or wwn . startswith ( "eui." ) or wwn . startswith ( "ib." ) ) : wwn = wwn_type + "." + wwn return wwn
Some wwns may have alternate text representations.
Some wwns may have alternate text representations .
'''
    Some wwns may have alternate text representations. Adjust to our
    preferred representation.
    '''
wwn_type
wwn