(arg)
return addr, val
Retrieve protocol and options from argument.
Retrieve protocol and options from argument.
Retrieve protocol and options from argument .
def parse_protocol_string(arg):
    """Retrieve protocol and options from argument."""
    if not arg:
        return None, u''
    argsplit = arg.split(u':', 1)
    if len(argsplit) == 1:
        addr, val = None, argsplit[0]
    else:
        addr, val = argsplit[0].upper(), u''.join(argsplit[1:])
    return addr, val
def parse_protocol_string ( arg ) : if not arg : return None , u'' argsplit = arg . split ( u':' , 1 ) if len ( argsplit ) == 1 : addr , val = None , argsplit [ 0 ] else : addr , val = argsplit [ 0 ] . upper ( ) , u'' . join ( argsplit [ 1 : ] ) return addr , val