def _get_sp_txt(p):
    """
    Produces a comma separated string of the defined subproject names, if avaialble

    :param looper.Project p: project to search the subprojects in
    :return str | NoneType: subprojects names
    """
    try:
        sp_names = p.subprojects.keys()
    except AttributeError:
        sp_names = None
    return ",".join(sp_names) if sp_names is not None else sp_names