Parse list of capabilities in --capabilitylist option.

    Input string of the form: cap_name=uri,cap_name=uri

def parse_capabilities(caps_str):
    """Parse list of capabilities in --capabilitylist option.

    Input string of the form: cap_name=uri,cap_name=uri
    """
    capabilities = {}
    try:
        segs = caps_str.split(',')
        for term in segs:
            (k, v) = term.split('=')
            capabilities[k] = v
    except ValueError as e:
        raise ClientFatalError(
            "Bad component of --capabilitylist option '%s' (%s)" %
            (caps_str, str(e)))
    return(capabilities)