add deb repo to /etc/apt/sources.list.d/ from content

def write_sources_list_content(content, filename='ceph.list', mode=0o644):
    """add deb repo to /etc/apt/sources.list.d/ from content"""
    repo_path = os.path.join('/etc/apt/sources.list.d', filename)
    if not isinstance(content, str):
        content = content.decode('utf-8')
    write_file(repo_path, content.encode('utf-8'), mode)